mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-15 02:08:05 +02:00
Compare commits
92 commits
master
...
xorg-serve
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e597f0119c | ||
|
|
6c491463ee | ||
|
|
b747a91485 | ||
|
|
a1ed67fa05 | ||
|
|
f89c39e6c9 | ||
|
|
dea9377a25 | ||
|
|
d2db5100b1 | ||
|
|
5b28bcb340 | ||
|
|
e1ea93fec9 | ||
|
|
9eaa0b5c89 | ||
|
|
a3b6ecc893 | ||
|
|
4a339afc58 | ||
|
|
9a4be7e99f | ||
|
|
8046717d72 | ||
|
|
cea9f9f273 | ||
|
|
b15be8547d | ||
|
|
82e0ae0423 | ||
|
|
4e4bb319a4 | ||
|
|
8c73f6bcbd | ||
|
|
ae4272a574 | ||
|
|
20efd3c158 | ||
|
|
cf296f2eef | ||
|
|
4b38661024 | ||
|
|
f9b00c2aba | ||
|
|
e4984b3023 | ||
|
|
625d108819 | ||
|
|
53e347b22b | ||
|
|
b736f8c92b | ||
|
|
b2a4c09507 | ||
|
|
beaa7ad2ec | ||
|
|
41524dd610 | ||
|
|
ee66474eb2 | ||
|
|
0ca8869e45 | ||
|
|
e76c397eb9 | ||
|
|
db418ff750 | ||
|
|
6b11b18ab6 | ||
|
|
df16b789aa | ||
|
|
befa8a3b83 | ||
|
|
b22783f483 | ||
|
|
083599c559 | ||
|
|
05a890df0a | ||
|
|
f494410842 | ||
|
|
bed7d7f31e | ||
|
|
4689c84a07 | ||
|
|
e2661ddbc5 | ||
|
|
2e3406fc67 | ||
|
|
b440fc9c1b | ||
|
|
40c1287f36 | ||
|
|
7972e2dade | ||
|
|
73beaf9033 | ||
|
|
6105fcaa35 | ||
|
|
d113b29115 | ||
|
|
4dc5b6ea9f | ||
|
|
a1925f0879 | ||
|
|
a6a21f84bb | ||
|
|
2f2d871ccd | ||
|
|
34bb83b9df | ||
|
|
97f2ae60fc | ||
|
|
89626304ea | ||
|
|
c68a84e73d | ||
|
|
2d6760f591 | ||
|
|
0bffe6b38c | ||
|
|
a1d638da0d | ||
|
|
0715469f1c | ||
|
|
bc2600466e | ||
|
|
7be5492bcf | ||
|
|
0ad049706d | ||
|
|
3b931c9276 | ||
|
|
f22a41416b | ||
|
|
82445286d5 | ||
|
|
c8c5ed998a | ||
|
|
d780c6f630 | ||
|
|
12f65819ff | ||
|
|
f80d233578 | ||
|
|
374be44d13 | ||
|
|
bbe6a69da3 | ||
|
|
2e28ff155f | ||
|
|
79ac611d31 | ||
|
|
843737b4f9 | ||
|
|
cb9c1d6d6c | ||
|
|
ef5c31430c | ||
|
|
ec8ee3a9f7 | ||
|
|
603ad6608a | ||
|
|
65469f5ea9 | ||
|
|
bec15eb73a | ||
|
|
b45e226753 | ||
|
|
e9ae333160 | ||
|
|
347f5610ca | ||
|
|
7b74bb6752 | ||
|
|
bd6ea85209 | ||
|
|
aabd25bd0b | ||
|
|
8988105166 |
74 changed files with 718 additions and 301 deletions
|
|
@ -927,7 +927,7 @@ ScreenSaverSetAttributes (ClientPtr client)
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
/* over allocate for override redirect */
|
/* over allocate for override redirect */
|
||||||
values = malloc((len + 1) * sizeof (unsigned long));
|
pAttr->values = values = malloc((len + 1) * sizeof (unsigned long));
|
||||||
if (!values)
|
if (!values)
|
||||||
{
|
{
|
||||||
ret = BadAlloc;
|
ret = BadAlloc;
|
||||||
|
|
@ -947,7 +947,6 @@ ScreenSaverSetAttributes (ClientPtr client)
|
||||||
pAttr->pCursor = NullCursor;
|
pAttr->pCursor = NullCursor;
|
||||||
pAttr->pBackgroundPixmap = NullPixmap;
|
pAttr->pBackgroundPixmap = NullPixmap;
|
||||||
pAttr->pBorderPixmap = NullPixmap;
|
pAttr->pBorderPixmap = NullPixmap;
|
||||||
pAttr->values = values;
|
|
||||||
/*
|
/*
|
||||||
* go through the mask, checking the values,
|
* go through the mask, checking the values,
|
||||||
* looking up pixmaps and cursors and hold a reference
|
* looking up pixmaps and cursors and hold a reference
|
||||||
|
|
|
||||||
|
|
@ -148,9 +148,7 @@ SecurityLabelInitial(void)
|
||||||
static _X_INLINE const char *
|
static _X_INLINE const char *
|
||||||
SecurityLookupRequestName(ClientPtr client)
|
SecurityLookupRequestName(ClientPtr client)
|
||||||
{
|
{
|
||||||
int major = ((xReq *)client->requestBuffer)->reqType;
|
return LookupRequestName(client->majorOp, client->minorOp);
|
||||||
int minor = MinorOpcodeOfRequest(client);
|
|
||||||
return LookupRequestName(major, minor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -482,7 +482,7 @@ doShmPutImage(DrawablePtr dst, GCPtr pGC,
|
||||||
{
|
{
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
|
|
||||||
if (format == ZPixmap || depth == 1) {
|
if (format == ZPixmap || (format == XYPixmap && depth == 1)) {
|
||||||
pPixmap = GetScratchPixmapHeader(dst->pScreen, w, h, depth,
|
pPixmap = GetScratchPixmapHeader(dst->pScreen, w, h, depth,
|
||||||
BitsPerPixel(depth),
|
BitsPerPixel(depth),
|
||||||
PixmapBytePad(w, depth),
|
PixmapBytePad(w, depth),
|
||||||
|
|
@ -991,7 +991,6 @@ CreatePmap:
|
||||||
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||||
pMap->drawable.id = newPix->info[j].id;
|
pMap->drawable.id = newPix->info[j].id;
|
||||||
if (!AddResource(newPix->info[j].id, RT_PIXMAP, (pointer)pMap)) {
|
if (!AddResource(newPix->info[j].id, RT_PIXMAP, (pointer)pMap)) {
|
||||||
(*pScreen->DestroyPixmap)(pMap);
|
|
||||||
result = BadAlloc;
|
result = BadAlloc;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -1002,10 +1001,8 @@ CreatePmap:
|
||||||
}
|
}
|
||||||
|
|
||||||
if(result == BadAlloc) {
|
if(result == BadAlloc) {
|
||||||
while(j--) {
|
while(j--)
|
||||||
(*pScreen->DestroyPixmap)(pMap);
|
|
||||||
FreeResource(newPix->info[j].id, RT_NONE);
|
FreeResource(newPix->info[j].id, RT_NONE);
|
||||||
}
|
|
||||||
free(newPix);
|
free(newPix);
|
||||||
} else
|
} else
|
||||||
AddResource(stuff->pid, XRT_PIXMAP, newPix);
|
AddResource(stuff->pid, XRT_PIXMAP, newPix);
|
||||||
|
|
@ -1110,7 +1107,6 @@ CreatePmap:
|
||||||
{
|
{
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
pDraw->pScreen->DestroyPixmap(pMap);
|
|
||||||
}
|
}
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,10 @@ int XaceHook(int hook, ...)
|
||||||
} u;
|
} u;
|
||||||
int *prv = NULL; /* points to return value from callback */
|
int *prv = NULL; /* points to return value from callback */
|
||||||
va_list ap; /* argument list */
|
va_list ap; /* argument list */
|
||||||
|
|
||||||
|
if (!XaceHooks[hook])
|
||||||
|
return Success;
|
||||||
|
|
||||||
va_start(ap, hook);
|
va_start(ap, hook);
|
||||||
|
|
||||||
/* Marshal arguments for passing to callback.
|
/* Marshal arguments for passing to callback.
|
||||||
|
|
|
||||||
|
|
@ -528,12 +528,6 @@ ProcSELinuxDispatch(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcSELinuxQueryVersion(ClientPtr client)
|
SProcSELinuxQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(SELinuxQueryVersionReq);
|
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(SELinuxQueryVersionReq);
|
|
||||||
swaps(&stuff->client_major, n);
|
|
||||||
swaps(&stuff->client_minor, n);
|
|
||||||
return ProcSELinuxQueryVersion(client);
|
return ProcSELinuxQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -263,8 +263,8 @@ SELinuxAudit(void *auditdata,
|
||||||
if (client) {
|
if (client) {
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
if (stuff) {
|
if (stuff) {
|
||||||
major = stuff->reqType;
|
major = client->majorOp;
|
||||||
minor = MinorOpcodeOfRequest(client);
|
minor = client->minorOp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (audit->id)
|
if (audit->id)
|
||||||
|
|
|
||||||
|
|
@ -1265,7 +1265,7 @@ ProcXvDispatch(ClientPtr client)
|
||||||
|
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
|
|
||||||
if (stuff->data > xvNumRequests) {
|
if (stuff->data >= xvNumRequests) {
|
||||||
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
|
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
}
|
}
|
||||||
|
|
@ -1589,7 +1589,7 @@ SProcXvDispatch(ClientPtr client)
|
||||||
|
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
|
|
||||||
if (stuff->data > xvNumRequests) {
|
if (stuff->data >= xvNumRequests) {
|
||||||
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
|
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -927,7 +927,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
|
||||||
|
|
||||||
for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
|
for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
|
||||||
if (BitIsOn(mouse->button->down, i))
|
if (BitIsOn(mouse->button->down, i))
|
||||||
SetBit(event->buttons, i);
|
SetBit(event->buttons, mouse->button->map[i]);
|
||||||
|
|
||||||
if (kbd && kbd->key)
|
if (kbd && kbd->key)
|
||||||
{
|
{
|
||||||
|
|
@ -1441,7 +1441,7 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
|
||||||
rc = CheckGrabValues(client, param);
|
rc = CheckGrabValues(client, param);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
if (k == NULL)
|
if ((dev->id != XIAllDevices && dev->id != XIAllMasterDevices) && k == NULL)
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
if (grabtype == GRABTYPE_XI)
|
if (grabtype == GRABTYPE_XI)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -409,7 +409,7 @@ static int
|
||||||
ProcIDispatch(ClientPtr client)
|
ProcIDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
if (stuff->data > ARRAY_SIZE(ProcIVector) || !ProcIVector[stuff->data])
|
if (stuff->data >= ARRAY_SIZE(ProcIVector) || !ProcIVector[stuff->data])
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
|
|
||||||
return (*ProcIVector[stuff->data])(client);
|
return (*ProcIVector[stuff->data])(client);
|
||||||
|
|
@ -428,7 +428,7 @@ static int
|
||||||
SProcIDispatch(ClientPtr client)
|
SProcIDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
if (stuff->data > ARRAY_SIZE(SProcIVector) || !SProcIVector[stuff->data])
|
if (stuff->data >= ARRAY_SIZE(SProcIVector) || !SProcIVector[stuff->data])
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
|
|
||||||
return (*SProcIVector[stuff->data])(client);
|
return (*SProcIVector[stuff->data])(client);
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,19 @@ unwind:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
disable_clientpointer(DeviceIntPtr dev)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < currentMaxClients; i++)
|
||||||
|
{
|
||||||
|
ClientPtr client = clients[i];
|
||||||
|
if (client && client->clientPtr == dev)
|
||||||
|
client->clientPtr = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
|
remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
|
||||||
int flags[MAXDEVICES])
|
int flags[MAXDEVICES])
|
||||||
|
|
@ -252,6 +265,8 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
goto unwind;
|
goto unwind;
|
||||||
|
|
||||||
|
disable_clientpointer(ptr);
|
||||||
|
|
||||||
/* Disabling sends the devices floating, reattach them if
|
/* Disabling sends the devices floating, reattach them if
|
||||||
* desired. */
|
* desired. */
|
||||||
if (r->return_mode == XIAttachToMaster)
|
if (r->return_mode == XIAttachToMaster)
|
||||||
|
|
|
||||||
|
|
@ -140,11 +140,17 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
||||||
memset(¶m, 0, sizeof(param));
|
memset(¶m, 0, sizeof(param));
|
||||||
param.grabtype = GRABTYPE_XI2;
|
param.grabtype = GRABTYPE_XI2;
|
||||||
param.ownerEvents = stuff->owner_events;
|
param.ownerEvents = stuff->owner_events;
|
||||||
param.this_device_mode = stuff->grab_mode;
|
|
||||||
param.other_devices_mode = stuff->paired_device_mode;
|
|
||||||
param.grabWindow = stuff->grab_window;
|
param.grabWindow = stuff->grab_window;
|
||||||
param.cursor = stuff->cursor;
|
param.cursor = stuff->cursor;
|
||||||
|
|
||||||
|
if (IsKeyboardDevice(dev)) {
|
||||||
|
param.this_device_mode = stuff->grab_mode;
|
||||||
|
param.other_devices_mode = stuff->paired_device_mode;
|
||||||
|
} else {
|
||||||
|
param.this_device_mode = stuff->paired_device_mode;
|
||||||
|
param.other_devices_mode = stuff->grab_mode;
|
||||||
|
}
|
||||||
|
|
||||||
if (stuff->cursor != None)
|
if (stuff->cursor != None)
|
||||||
{
|
{
|
||||||
status = dixLookupResourceByType(&tmp, stuff->cursor,
|
status = dixLookupResourceByType(&tmp, stuff->cursor,
|
||||||
|
|
@ -261,9 +267,16 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
|
||||||
REQUEST(xXIPassiveUngrabDeviceReq);
|
REQUEST(xXIPassiveUngrabDeviceReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
|
REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
|
||||||
|
|
||||||
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
|
if (stuff->deviceid == XIAllDevices)
|
||||||
if (rc != Success)
|
dev = inputInfo.all_devices;
|
||||||
return rc;
|
else if (stuff->deviceid == XIAllMasterDevices)
|
||||||
|
dev = inputInfo.all_master_devices;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
if (stuff->grab_type != XIGrabtypeButton &&
|
if (stuff->grab_type != XIGrabtypeButton &&
|
||||||
stuff->grab_type != XIGrabtypeKeycode &&
|
stuff->grab_type != XIGrabtypeKeycode &&
|
||||||
|
|
|
||||||
|
|
@ -196,11 +196,7 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update)
|
||||||
|
|
||||||
anyMarked = compMarkWindows (pWin, &pLayerWin);
|
anyMarked = compMarkWindows (pWin, &pLayerWin);
|
||||||
|
|
||||||
/* Make sure our borderClip is correct for ValidateTree */
|
|
||||||
RegionNull(&cw->borderClip);
|
RegionNull(&cw->borderClip);
|
||||||
RegionCopy(&cw->borderClip, &pWin->borderClip);
|
|
||||||
cw->borderClipX = pWin->drawable.x;
|
|
||||||
cw->borderClipY = pWin->drawable.y;
|
|
||||||
cw->update = CompositeRedirectAutomatic;
|
cw->update = CompositeRedirectAutomatic;
|
||||||
cw->clients = 0;
|
cw->clients = 0;
|
||||||
cw->oldx = COMP_ORIGIN_INVALID;
|
cw->oldx = COMP_ORIGIN_INVALID;
|
||||||
|
|
@ -658,6 +654,13 @@ compAllocPixmap (WindowPtr pWin)
|
||||||
DamageRegister (&pWin->drawable, cw->damage);
|
DamageRegister (&pWin->drawable, cw->damage);
|
||||||
cw->damageRegistered = TRUE;
|
cw->damageRegistered = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure our borderClip is up to date */
|
||||||
|
RegionUninit(&cw->borderClip);
|
||||||
|
RegionCopy(&cw->borderClip, &pWin->borderClip);
|
||||||
|
cw->borderClipX = pWin->drawable.x;
|
||||||
|
cw->borderClipY = pWin->drawable.y;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -355,6 +355,7 @@ device_added(LibHalContext *hal_ctx, const char *udi)
|
||||||
if (!strcasecmp(tmp, ".options") && (!xkb_opts.options))
|
if (!strcasecmp(tmp, ".options") && (!xkb_opts.options))
|
||||||
xkb_opts.options = strdup(tmp_val);
|
xkb_opts.options = strdup(tmp_val);
|
||||||
}
|
}
|
||||||
|
free(tmp_val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ device_added(struct udev_device *udev_device)
|
||||||
== -1)
|
== -1)
|
||||||
attrs.usb_id = NULL;
|
attrs.usb_id = NULL;
|
||||||
else
|
else
|
||||||
LOG_PROPERTY(path, "PRODUCT", product);
|
LOG_PROPERTY(ppath, "PRODUCT", product);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!name)
|
if (!name)
|
||||||
|
|
|
||||||
19
configure.ac
19
configure.ac
|
|
@ -26,8 +26,8 @@ dnl
|
||||||
dnl Process this file with autoconf to create configure.
|
dnl Process this file with autoconf to create configure.
|
||||||
|
|
||||||
AC_PREREQ(2.57)
|
AC_PREREQ(2.57)
|
||||||
AC_INIT([xorg-server], 1.11.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
|
AC_INIT([xorg-server], 1.11.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
|
||||||
RELEASE_DATE="2011-08-26"
|
RELEASE_DATE="2012-01-27"
|
||||||
AC_CONFIG_SRCDIR([Makefile.am])
|
AC_CONFIG_SRCDIR([Makefile.am])
|
||||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
@ -999,6 +999,13 @@ if test "x$RES" = xyes && test "x$CLIENTIDS" = xyes; then
|
||||||
else
|
else
|
||||||
CLIENTIDS=no
|
CLIENTIDS=no
|
||||||
fi
|
fi
|
||||||
|
if test "x$CLIENTIDS" = xyes; then
|
||||||
|
case $host_os in
|
||||||
|
openbsd*)
|
||||||
|
SYS_LIBS="$SYS_LIBS -lkvm"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
AC_MSG_RESULT([$CLIENTIDS])
|
AC_MSG_RESULT([$CLIENTIDS])
|
||||||
AM_CONDITIONAL(CLIENTIDS, [test "x$CLIENTIDS" = xyes])
|
AM_CONDITIONAL(CLIENTIDS, [test "x$CLIENTIDS" = xyes])
|
||||||
|
|
||||||
|
|
@ -2029,12 +2036,10 @@ if test "$KDRIVE" = yes; then
|
||||||
XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBGL libdrm"
|
XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBGL libdrm"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [xephyr="yes"], [xephyr="no"])
|
|
||||||
if test "x$XEPHYR" = xauto; then
|
if test "x$XEPHYR" = xauto; then
|
||||||
XEPHYR=$xephyr
|
PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [XEPHYR="yes"], [XEPHYR="no"])
|
||||||
fi
|
elif test "x$XEPHYR" = xyes ; then
|
||||||
if test "x$XEPHYR" = xyes && test "x$xephyr" = xno; then
|
PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS)
|
||||||
AC_MSG_ERROR([Xephyr dependencies missing])
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Xephyr needs nanosleep() which is in librt on Solaris
|
# Xephyr needs nanosleep() which is in librt on Solaris
|
||||||
|
|
|
||||||
|
|
@ -982,6 +982,8 @@ CloseDownDevices(void)
|
||||||
{
|
{
|
||||||
DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
|
|
||||||
|
OsBlockSignals();
|
||||||
|
|
||||||
/* Float all SDs before closing them. Note that at this point resources
|
/* Float all SDs before closing them. Note that at this point resources
|
||||||
* (e.g. cursors) have been freed already, so we can't just call
|
* (e.g. cursors) have been freed already, so we can't just call
|
||||||
* AttachDevice(NULL, dev, NULL). Instead, we have to forcibly set master
|
* AttachDevice(NULL, dev, NULL). Instead, we have to forcibly set master
|
||||||
|
|
@ -1004,6 +1006,8 @@ CloseDownDevices(void)
|
||||||
inputInfo.keyboard = NULL;
|
inputInfo.keyboard = NULL;
|
||||||
inputInfo.pointer = NULL;
|
inputInfo.pointer = NULL;
|
||||||
XkbDeleteRulesDflts();
|
XkbDeleteRulesDflts();
|
||||||
|
|
||||||
|
OsReleaseSignals();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -337,8 +337,6 @@ DisableLimitedSchedulingLatency(void)
|
||||||
SmartScheduleLatencyLimited = 0;
|
SmartScheduleLatencyLimited = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAJOROP ((xReq *)client->requestBuffer)->reqType
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Dispatch(void)
|
Dispatch(void)
|
||||||
{
|
{
|
||||||
|
|
@ -419,22 +417,33 @@ Dispatch(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
client->sequence++;
|
client->sequence++;
|
||||||
|
client->majorOp = ((xReq *)client->requestBuffer)->reqType;
|
||||||
|
client->minorOp = 0;
|
||||||
|
if (client->majorOp >= EXTENSION_BASE) {
|
||||||
|
ExtensionEntry *ext = GetExtensionEntry(client->majorOp);
|
||||||
|
if (ext)
|
||||||
|
client->minorOp = ext->MinorOpcode(client);
|
||||||
|
}
|
||||||
#ifdef XSERVER_DTRACE
|
#ifdef XSERVER_DTRACE
|
||||||
XSERVER_REQUEST_START(LookupMajorName(MAJOROP), MAJOROP,
|
if (XSERVER_REQUEST_START_ENABLED())
|
||||||
((xReq *)client->requestBuffer)->length,
|
XSERVER_REQUEST_START(LookupMajorName(client->majorOp),
|
||||||
client->index, client->requestBuffer);
|
client->majorOp,
|
||||||
|
((xReq *)client->requestBuffer)->length,
|
||||||
|
client->index, client->requestBuffer);
|
||||||
#endif
|
#endif
|
||||||
if (result > (maxBigRequestSize << 2))
|
if (result > (maxBigRequestSize << 2))
|
||||||
result = BadLength;
|
result = BadLength;
|
||||||
else {
|
else {
|
||||||
result = XaceHookDispatch(client, MAJOROP);
|
result = XaceHookDispatch(client, client->majorOp);
|
||||||
if (result == Success)
|
if (result == Success)
|
||||||
result = (* client->requestVector[MAJOROP])(client);
|
result = (* client->requestVector[client->majorOp])(client);
|
||||||
XaceHookAuditEnd(client, result);
|
XaceHookAuditEnd(client, result);
|
||||||
}
|
}
|
||||||
#ifdef XSERVER_DTRACE
|
#ifdef XSERVER_DTRACE
|
||||||
XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP,
|
if (XSERVER_REQUEST_DONE_ENABLED())
|
||||||
client->sequence, client->index, result);
|
XSERVER_REQUEST_DONE(LookupMajorName(client->majorOp),
|
||||||
|
client->majorOp, client->sequence,
|
||||||
|
client->index, result);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (client->noClientException != Success)
|
if (client->noClientException != Success)
|
||||||
|
|
@ -444,8 +453,8 @@ Dispatch(void)
|
||||||
}
|
}
|
||||||
else if (result != Success)
|
else if (result != Success)
|
||||||
{
|
{
|
||||||
SendErrorToClient(client, MAJOROP,
|
SendErrorToClient(client, client->majorOp,
|
||||||
MinorOpcodeOfRequest(client),
|
client->minorOp,
|
||||||
client->errorValue, result);
|
client->errorValue, result);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -466,8 +475,6 @@ Dispatch(void)
|
||||||
SmartScheduleLatencyLimited = 0;
|
SmartScheduleLatencyLimited = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef MAJOROP
|
|
||||||
|
|
||||||
static int VendorRelease = VENDOR_RELEASE;
|
static int VendorRelease = VENDOR_RELEASE;
|
||||||
static char *VendorString = VENDOR_NAME;
|
static char *VendorString = VENDOR_NAME;
|
||||||
|
|
||||||
|
|
@ -1419,7 +1426,6 @@ CreatePmap:
|
||||||
}
|
}
|
||||||
if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap))
|
if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap))
|
||||||
return Success;
|
return Success;
|
||||||
(*pDraw->pScreen->DestroyPixmap)(pMap);
|
|
||||||
}
|
}
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1302,31 +1302,30 @@ doPolyText(ClientPtr client, PTclosurePtr c)
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
*new_closure = *c;
|
*new_closure = *c;
|
||||||
c = new_closure;
|
|
||||||
|
|
||||||
len = c->endReq - c->pElt;
|
len = new_closure->endReq - new_closure->pElt;
|
||||||
c->data = malloc(len);
|
new_closure->data = malloc(len);
|
||||||
if (!c->data)
|
if (!new_closure->data)
|
||||||
{
|
{
|
||||||
free(c);
|
free(new_closure);
|
||||||
err = BadAlloc;
|
err = BadAlloc;
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
memmove(c->data, c->pElt, len);
|
memmove(new_closure->data, new_closure->pElt, len);
|
||||||
c->pElt = c->data;
|
new_closure->pElt = new_closure->data;
|
||||||
c->endReq = c->pElt + len;
|
new_closure->endReq = new_closure->pElt + len;
|
||||||
|
|
||||||
/* Step 2 */
|
/* Step 2 */
|
||||||
|
|
||||||
pGC = GetScratchGC(c->pGC->depth, c->pGC->pScreen);
|
pGC = GetScratchGC(new_closure->pGC->depth, new_closure->pGC->pScreen);
|
||||||
if (!pGC)
|
if (!pGC)
|
||||||
{
|
{
|
||||||
free(c->data);
|
free(new_closure->data);
|
||||||
free(c);
|
free(new_closure);
|
||||||
err = BadAlloc;
|
err = BadAlloc;
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
if ((err = CopyGC(c->pGC, pGC, GCFunction |
|
if ((err = CopyGC(new_closure->pGC, pGC, GCFunction |
|
||||||
GCPlaneMask | GCForeground |
|
GCPlaneMask | GCForeground |
|
||||||
GCBackground | GCFillStyle |
|
GCBackground | GCFillStyle |
|
||||||
GCTile | GCStipple |
|
GCTile | GCStipple |
|
||||||
|
|
@ -1337,15 +1336,16 @@ doPolyText(ClientPtr client, PTclosurePtr c)
|
||||||
Success)
|
Success)
|
||||||
{
|
{
|
||||||
FreeScratchGC(pGC);
|
FreeScratchGC(pGC);
|
||||||
free(c->data);
|
free(new_closure->data);
|
||||||
free(c);
|
free(new_closure);
|
||||||
err = BadAlloc;
|
err = BadAlloc;
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
c = new_closure;
|
||||||
origGC = c->pGC;
|
origGC = c->pGC;
|
||||||
c->pGC = pGC;
|
c->pGC = pGC;
|
||||||
ValidateGC(c->pDraw, c->pGC);
|
ValidateGC(c->pDraw, c->pGC);
|
||||||
|
|
||||||
ClientSleep(client, (ClientSleepProcPtr)doPolyText, c);
|
ClientSleep(client, (ClientSleepProcPtr)doPolyText, c);
|
||||||
|
|
||||||
/* Set up to perform steps 3 and 4 */
|
/* Set up to perform steps 3 and 4 */
|
||||||
|
|
|
||||||
|
|
@ -202,13 +202,12 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client,
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
*pDraw = NULL;
|
*pDraw = NULL;
|
||||||
client->errorValue = id;
|
|
||||||
|
|
||||||
if (id == INVALID)
|
|
||||||
return BadDrawable;
|
|
||||||
|
|
||||||
rc = dixLookupResourceByClass((pointer *)&pTmp, id, RC_DRAWABLE, client, access);
|
rc = dixLookupResourceByClass((pointer *)&pTmp, id, RC_DRAWABLE, client, access);
|
||||||
|
|
||||||
|
if (rc != Success)
|
||||||
|
client->errorValue = id;
|
||||||
|
|
||||||
if (rc == BadValue)
|
if (rc == BadValue)
|
||||||
return BadDrawable;
|
return BadDrawable;
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
|
|
||||||
20
dix/events.c
20
dix/events.c
|
|
@ -1356,7 +1356,7 @@ ScreenRestructured (ScreenPtr pScreen)
|
||||||
|
|
||||||
for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
|
for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
|
||||||
{
|
{
|
||||||
if (!DevHasCursor(pDev))
|
if (!IsFloating(pDev) && !DevHasCursor(pDev))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* GrabDevice doesn't have a confineTo field, so we don't need to
|
/* GrabDevice doesn't have a confineTo field, so we don't need to
|
||||||
|
|
@ -3678,7 +3678,7 @@ CheckPassiveGrabsOnWindow(
|
||||||
if (tempGrab.type < GenericEvent)
|
if (tempGrab.type < GenericEvent)
|
||||||
{
|
{
|
||||||
grab->device = device;
|
grab->device = device;
|
||||||
grab->modifierDevice = GetPairedDevice(device);
|
grab->modifierDevice = GetMaster(device, MASTER_KEYBOARD);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (other = inputInfo.devices; other; other = other->next)
|
for (other = inputInfo.devices; other; other = other->next)
|
||||||
|
|
@ -5224,6 +5224,8 @@ CloseDownEvents(void)
|
||||||
InputEventList = NULL;
|
InputEventList = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define SEND_EVENT_BIT 0x80
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Server-side protocol handling for SendEvent request.
|
* Server-side protocol handling for SendEvent request.
|
||||||
*
|
*
|
||||||
|
|
@ -5241,6 +5243,16 @@ ProcSendEvent(ClientPtr client)
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xSendEventReq);
|
REQUEST_SIZE_MATCH(xSendEventReq);
|
||||||
|
|
||||||
|
/* libXext and other extension libraries may set the bit indicating
|
||||||
|
* that this event came from a SendEvent request so remove it
|
||||||
|
* since otherwise the event type may fail the range checks
|
||||||
|
* and cause an invalid BadValue error to be returned.
|
||||||
|
*
|
||||||
|
* This is safe to do since we later add the SendEvent bit (0x80)
|
||||||
|
* back in once we send the event to the client */
|
||||||
|
|
||||||
|
stuff->event.u.u.type &= ~(SEND_EVENT_BIT);
|
||||||
|
|
||||||
/* The client's event type must be a core event type or one defined by an
|
/* The client's event type must be a core event type or one defined by an
|
||||||
extension. */
|
extension. */
|
||||||
|
|
||||||
|
|
@ -5298,7 +5310,7 @@ ProcSendEvent(ClientPtr client)
|
||||||
client->errorValue = stuff->propagate;
|
client->errorValue = stuff->propagate;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
stuff->event.u.u.type |= 0x80;
|
stuff->event.u.u.type |= SEND_EVENT_BIT;
|
||||||
if (stuff->propagate)
|
if (stuff->propagate)
|
||||||
{
|
{
|
||||||
for (;pWin; pWin = pWin->parent)
|
for (;pWin; pWin = pWin->parent)
|
||||||
|
|
@ -5360,7 +5372,7 @@ ProcUngrabKey(ClientPtr client)
|
||||||
tempGrab.window = pWin;
|
tempGrab.window = pWin;
|
||||||
tempGrab.modifiersDetail.exact = stuff->modifiers;
|
tempGrab.modifiersDetail.exact = stuff->modifiers;
|
||||||
tempGrab.modifiersDetail.pMask = NULL;
|
tempGrab.modifiersDetail.pMask = NULL;
|
||||||
tempGrab.modifierDevice = GetPairedDevice(keybd);
|
tempGrab.modifierDevice = keybd;
|
||||||
tempGrab.type = KeyPress;
|
tempGrab.type = KeyPress;
|
||||||
tempGrab.grabtype = GRABTYPE_CORE;
|
tempGrab.grabtype = GRABTYPE_CORE;
|
||||||
tempGrab.detail.exact = stuff->key;
|
tempGrab.detail.exact = stuff->key;
|
||||||
|
|
|
||||||
|
|
@ -228,20 +228,6 @@ StandardMinorOpcode(ClientPtr client)
|
||||||
return ((xReq *)client->requestBuffer)->data;
|
return ((xReq *)client->requestBuffer)->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned short
|
|
||||||
MinorOpcodeOfRequest(ClientPtr client)
|
|
||||||
{
|
|
||||||
unsigned char major;
|
|
||||||
|
|
||||||
major = ((xReq *)client->requestBuffer)->reqType;
|
|
||||||
if (major < EXTENSION_BASE)
|
|
||||||
return 0;
|
|
||||||
major -= EXTENSION_BASE;
|
|
||||||
if (major >= NumExtensions)
|
|
||||||
return 0;
|
|
||||||
return (*extensions[major]->MinorOpcode)(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CloseDownExtensions(void)
|
CloseDownExtensions(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1309,7 +1309,7 @@ GetProximityEvents(InternalEvent *events, DeviceIntPtr pDev, int type, const Val
|
||||||
/* Sanity checks. */
|
/* Sanity checks. */
|
||||||
if ((type != ProximityIn && type != ProximityOut) || !mask_in)
|
if ((type != ProximityIn && type != ProximityOut) || !mask_in)
|
||||||
return 0;
|
return 0;
|
||||||
if (!pDev->valuator)
|
if (!pDev->valuator || !pDev->proximity)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
valuator_mask_copy(&mask, mask_in);
|
valuator_mask_copy(&mask, mask_in);
|
||||||
|
|
|
||||||
|
|
@ -479,7 +479,7 @@ AddPassiveGrabToList(ClientPtr client, GrabPtr pGrab)
|
||||||
|
|
||||||
for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next)
|
for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next)
|
||||||
{
|
{
|
||||||
if (GrabMatchesSecond(pGrab, grab, FALSE))
|
if (GrabMatchesSecond(pGrab, grab, (pGrab->grabtype == GRABTYPE_CORE)))
|
||||||
{
|
{
|
||||||
if (CLIENT_BITS(pGrab->resource) != CLIENT_BITS(grab->resource))
|
if (CLIENT_BITS(pGrab->resource) != CLIENT_BITS(grab->resource))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,9 @@ create_bits_picture (PicturePtr pict,
|
||||||
(pixman_format_code_t)pict->format,
|
(pixman_format_code_t)pict->format,
|
||||||
pixmap->drawable.width, pixmap->drawable.height,
|
pixmap->drawable.width, pixmap->drawable.height,
|
||||||
(uint32_t *)bits, stride * sizeof (FbStride));
|
(uint32_t *)bits, stride * sizeof (FbStride));
|
||||||
|
|
||||||
|
if (!image)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
#ifdef FB_ACCESS_WRAPPER
|
#ifdef FB_ACCESS_WRAPPER
|
||||||
#if FB_SHIFT==5
|
#if FB_SHIFT==5
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,8 @@
|
||||||
#define fbStippleTable wfbStippleTable
|
#define fbStippleTable wfbStippleTable
|
||||||
#define fbTile wfbTile
|
#define fbTile wfbTile
|
||||||
#define fbTransparentSpan wfbTransparentSpan
|
#define fbTransparentSpan wfbTransparentSpan
|
||||||
|
#define fbTrapezoids wfbTrapezoids
|
||||||
|
#define fbTriangles wfbTriangles
|
||||||
#define fbUninstallColormap wfbUninstallColormap
|
#define fbUninstallColormap wfbUninstallColormap
|
||||||
#define fbUnmapWindow wfbUnmapWindow
|
#define fbUnmapWindow wfbUnmapWindow
|
||||||
#define fbUnrealizeFont wfbUnrealizeFont
|
#define fbUnrealizeFont wfbUnrealizeFont
|
||||||
|
|
|
||||||
|
|
@ -10,60 +10,60 @@ bin_PROGRAMS = \
|
||||||
noinst_PROGRAMS = xinput xtest evi res xled xbell $(EV_PROG)
|
noinst_PROGRAMS = xinput xtest evi res xled xbell $(EV_PROG)
|
||||||
|
|
||||||
dmxinfo_SOURCES = dmxinfo.c
|
dmxinfo_SOURCES = dmxinfo.c
|
||||||
dmxinfo_LDADD = @DMXEXAMPLES_DEP_LIBS@
|
dmxinfo_LDADD = $(DMXEXAMPLES_DEP_LIBS)
|
||||||
dmxinfo_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
|
dmxinfo_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
dmxwininfo_SOURCES = dmxwininfo.c
|
dmxwininfo_SOURCES = dmxwininfo.c
|
||||||
dmxwininfo_LDADD = @DMXXMUEXAMPLES_DEP_LIBS@
|
dmxwininfo_LDADD = $(DMXXMUEXAMPLES_DEP_LIBS)
|
||||||
dmxwininfo_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
|
dmxwininfo_CFLAGS = $(DMXXMUEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
dmxreconfig_SOURCES = dmxreconfig.c
|
dmxreconfig_SOURCES = dmxreconfig.c
|
||||||
dmxreconfig_LDADD = @DMXEXAMPLES_DEP_LIBS@
|
dmxreconfig_LDADD = $(DMXEXAMPLES_DEP_LIBS)
|
||||||
dmxreconfig_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
|
dmxreconfig_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
dmxresize_SOURCES = dmxresize.c
|
dmxresize_SOURCES = dmxresize.c
|
||||||
dmxresize_LDADD = @DMXEXAMPLES_DEP_LIBS@
|
dmxresize_LDADD = $(DMXEXAMPLES_DEP_LIBS)
|
||||||
dmxresize_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
|
dmxresize_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
dmxaddscreen_SOURCES = dmxaddscreen.c
|
dmxaddscreen_SOURCES = dmxaddscreen.c
|
||||||
dmxaddscreen_LDADD = @DMXEXAMPLES_DEP_LIBS@
|
dmxaddscreen_LDADD = $(DMXEXAMPLES_DEP_LIBS)
|
||||||
dmxaddscreen_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
|
dmxaddscreen_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
dmxrmscreen_SOURCES = dmxrmscreen.c
|
dmxrmscreen_SOURCES = dmxrmscreen.c
|
||||||
dmxrmscreen_LDADD = @DMXEXAMPLES_DEP_LIBS@
|
dmxrmscreen_LDADD = $(DMXEXAMPLES_DEP_LIBS)
|
||||||
dmxrmscreen_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
|
dmxrmscreen_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
dmxaddinput_SOURCES = dmxaddinput.c
|
dmxaddinput_SOURCES = dmxaddinput.c
|
||||||
dmxaddinput_LDADD = @DMXEXAMPLES_DEP_LIBS@
|
dmxaddinput_LDADD = $(DMXEXAMPLES_DEP_LIBS)
|
||||||
dmxaddinput_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
|
dmxaddinput_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
dmxrminput_SOURCES = dmxrminput.c
|
dmxrminput_SOURCES = dmxrminput.c
|
||||||
dmxrminput_LDADD = @DMXEXAMPLES_DEP_LIBS@
|
dmxrminput_LDADD = $(DMXEXAMPLES_DEP_LIBS)
|
||||||
dmxrminput_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
|
dmxrminput_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
xinput_SOURCES = xinput.c
|
xinput_SOURCES = xinput.c
|
||||||
xinput_LDADD = @DMXXIEXAMPLES_DEP_LIBS@
|
xinput_LDADD = $(DMXXIEXAMPLES_DEP_LIBS)
|
||||||
xinput_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
|
xinput_CFLAGS = $(DMXXIEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
xtest_SOURCES = xtest.c
|
xtest_SOURCES = xtest.c
|
||||||
xtest_LDADD = @XTSTEXAMPLES_DEP_LIBS@
|
xtest_LDADD = $(XTSTEXAMPLES_DEP_LIBS)
|
||||||
xtest_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
|
xtest_CFLAGS = $(XTSTEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
evi_SOURCES = evi.c
|
evi_SOURCES = evi.c
|
||||||
evi_LDADD = @X11EXAMPLES_DEP_LIBS@
|
evi_LDADD = $(X11EXAMPLES_DEP_LIBS)
|
||||||
evi_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
|
evi_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
res_SOURCES = res.c
|
res_SOURCES = res.c
|
||||||
res_LDADD = @XRESEXAMPLES_DEP_LIBS@
|
res_LDADD = $(XRESEXAMPLES_DEP_LIBS)
|
||||||
res_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
|
res_CFLAGS = $(XRESEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
xled_SOURCES = xled.c
|
xled_SOURCES = xled.c
|
||||||
xled_LDADD = @X11EXAMPLES_DEP_LIBS@
|
xled_LDADD = $(X11EXAMPLES_DEP_LIBS)
|
||||||
xled_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
|
xled_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
xbell_SOURCES = xbell.c
|
xbell_SOURCES = xbell.c
|
||||||
xbell_LDADD = @X11EXAMPLES_DEP_LIBS@
|
xbell_LDADD = $(X11EXAMPLES_DEP_LIBS)
|
||||||
xbell_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
|
xbell_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
|
||||||
|
|
||||||
ev_SOURCES = ev.c
|
ev_SOURCES = ev.c
|
||||||
ev_LDADD =
|
ev_LDADD =
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
noinst_LIBRARIES = libglxproxy.a
|
noinst_LIBRARIES = libglxproxy.a
|
||||||
|
|
||||||
libglxproxy_a_SOURCES = compsize.c \
|
libglxproxy_a_SOURCES = compsize.c \
|
||||||
|
compsize.h \
|
||||||
g_disptab.c \
|
g_disptab.c \
|
||||||
g_disptab.h \
|
g_disptab.h \
|
||||||
global.c \
|
global.c \
|
||||||
glxcmds.c \
|
glxcmds.c \
|
||||||
|
glxcmds.h \
|
||||||
glxcmdsswap.c \
|
glxcmdsswap.c \
|
||||||
glxcontext.h \
|
glxcontext.h \
|
||||||
glxdrawable.h \
|
glxdrawable.h \
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
#include "compsize.h"
|
||||||
|
|
||||||
GLint __glFogiv_size(GLenum pname)
|
GLint __glFogiv_size(GLenum pname)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
51
hw/dmx/glxProxy/compsize.h
Normal file
51
hw/dmx/glxProxy/compsize.h
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2011 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 on 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
|
||||||
|
* NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
|
||||||
|
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __compsize_h__
|
||||||
|
#define __compsize_h__
|
||||||
|
|
||||||
|
extern GLint __glColorTableParameterfv_size(GLenum pname);
|
||||||
|
extern GLint __glColorTableParameteriv_size(GLenum pname);
|
||||||
|
extern GLint __glConvolutionParameterfv_size(GLenum pname);
|
||||||
|
extern GLint __glConvolutionParameteriv_size(GLenum pname);
|
||||||
|
extern GLint __glFogfv_size(GLenum pname);
|
||||||
|
extern GLint __glFogiv_size(GLenum pname);
|
||||||
|
extern GLint __glLightModelfv_size(GLenum pname);
|
||||||
|
extern GLint __glLightModeliv_size(GLenum pname);
|
||||||
|
extern GLint __glLightfv_size(GLenum pname);
|
||||||
|
extern GLint __glLightiv_size(GLenum pname);
|
||||||
|
extern GLint __glMaterialfv_size(GLenum pname);
|
||||||
|
extern GLint __glMaterialiv_size(GLenum pname);
|
||||||
|
extern GLint __glTexEnvfv_size(GLenum e);
|
||||||
|
extern GLint __glTexEnviv_size(GLenum e);
|
||||||
|
extern GLint __glTexGendv_size(GLenum e);
|
||||||
|
extern GLint __glTexGenfv_size(GLenum e);
|
||||||
|
extern GLint __glTexGeniv_size(GLenum e);
|
||||||
|
extern GLint __glTexParameterfv_size(GLenum e);
|
||||||
|
extern GLint __glTexParameteriv_size(GLenum e);
|
||||||
|
|
||||||
|
#endif /* !__compsize_h__ */
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
#include "glxext.h"
|
#include "glxext.h"
|
||||||
#include "g_disptab.h"
|
#include "g_disptab.h"
|
||||||
#include "unpack.h"
|
#include "unpack.h"
|
||||||
|
#include "compsize.h"
|
||||||
|
|
||||||
void __glXDispSwap_CallList(GLbyte *pc)
|
void __glXDispSwap_CallList(GLbyte *pc)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,8 @@
|
||||||
#include "glxvisuals.h"
|
#include "glxvisuals.h"
|
||||||
#include "glxswap.h"
|
#include "glxswap.h"
|
||||||
|
|
||||||
|
#include "glxcmds.h"
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
#include "panoramiXsrv.h"
|
#include "panoramiXsrv.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
37
hw/dmx/glxProxy/glxcmds.h
Normal file
37
hw/dmx/glxProxy/glxcmds.h
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2011 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 on 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
|
||||||
|
* NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
|
||||||
|
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GLX_cmds_h__
|
||||||
|
#define __GLX_cmds_h__
|
||||||
|
|
||||||
|
extern int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc);
|
||||||
|
extern int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc);
|
||||||
|
extern int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc);
|
||||||
|
extern int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc);
|
||||||
|
extern int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc);
|
||||||
|
|
||||||
|
#endif /* !__GLX_cmds_h__ */
|
||||||
|
|
@ -35,11 +35,14 @@
|
||||||
#include <pixmapstr.h>
|
#include <pixmapstr.h>
|
||||||
#include <windowstr.h>
|
#include <windowstr.h>
|
||||||
#include "unpack.h"
|
#include "unpack.h"
|
||||||
|
#include "glxcmds.h"
|
||||||
#include "glxext.h"
|
#include "glxext.h"
|
||||||
#include "glxvendor.h"
|
#include "glxvendor.h"
|
||||||
|
|
||||||
extern int glxIsExtensionSupported( char *ext );
|
extern int glxIsExtensionSupported( char *ext );
|
||||||
|
|
||||||
|
int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc);
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -692,7 +692,7 @@ LinuxKeyboardEnable (KdKeyboardInfo *ki)
|
||||||
return !Success;
|
return !Success;
|
||||||
|
|
||||||
fd = LinuxConsoleFd;
|
fd = LinuxConsoleFd;
|
||||||
ki->driverPrivate = (void *) fd;
|
ki->driverPrivate = (void *) (intptr_t) fd;
|
||||||
|
|
||||||
ioctl (fd, KDGKBMODE, &LinuxKbdTrans);
|
ioctl (fd, KDGKBMODE, &LinuxKbdTrans);
|
||||||
tcgetattr (fd, &LinuxTermios);
|
tcgetattr (fd, &LinuxTermios);
|
||||||
|
|
@ -724,7 +724,7 @@ LinuxKeyboardDisable (KdKeyboardInfo *ki)
|
||||||
if (!ki)
|
if (!ki)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fd = (int) ki->driverPrivate;
|
fd = (int) (intptr_t) ki->driverPrivate;
|
||||||
|
|
||||||
KdUnregisterFd(ki, fd, FALSE);
|
KdUnregisterFd(ki, fd, FALSE);
|
||||||
ioctl(fd, KDSKBMODE, LinuxKbdTrans);
|
ioctl(fd, KDSKBMODE, LinuxKbdTrans);
|
||||||
|
|
@ -753,7 +753,7 @@ LinuxKeyboardLeds (KdKeyboardInfo *ki, int leds)
|
||||||
if (!ki)
|
if (!ki)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ioctl ((int)ki->driverPrivate, KDSETLED, leds & 7);
|
ioctl ((int)(intptr_t)ki->driverPrivate, KDSETLED, leds & 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
KdKeyboardDriver LinuxKeyboardDriver = {
|
KdKeyboardDriver LinuxKeyboardDriver = {
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ MsEnable (KdPointerInfo *pi)
|
||||||
}
|
}
|
||||||
if (KdRegisterFd (port, MsRead, pi))
|
if (KdRegisterFd (port, MsRead, pi))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
pi->driverPrivate = (void *)port;
|
pi->driverPrivate = (void *)(intptr_t)port;
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
||||||
|
|
@ -164,7 +164,7 @@ MsEnable (KdPointerInfo *pi)
|
||||||
static void
|
static void
|
||||||
MsDisable (KdPointerInfo *pi)
|
MsDisable (KdPointerInfo *pi)
|
||||||
{
|
{
|
||||||
KdUnregisterFd (pi, (int)pi->driverPrivate, TRUE);
|
KdUnregisterFd (pi, (int)(intptr_t)pi->driverPrivate, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ Ps2Enable (KdPointerInfo *pi)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
pi->driverPrivate = (void *)fd;
|
pi->driverPrivate = (void *)(intptr_t)fd;
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
@ -168,7 +168,7 @@ Ps2Enable (KdPointerInfo *pi)
|
||||||
static void
|
static void
|
||||||
Ps2Disable (KdPointerInfo *pi)
|
Ps2Disable (KdPointerInfo *pi)
|
||||||
{
|
{
|
||||||
KdUnregisterFd (pi, (int)pi->driverPrivate, TRUE);
|
KdUnregisterFd (pi, (int)(intptr_t)pi->driverPrivate, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -2135,12 +2135,6 @@ KdCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y)
|
||||||
static void
|
static void
|
||||||
KdCrossScreen(ScreenPtr pScreen, Bool entering)
|
KdCrossScreen(ScreenPtr pScreen, Bool entering)
|
||||||
{
|
{
|
||||||
#ifndef XIPAQ
|
|
||||||
if (entering)
|
|
||||||
KdEnableScreen (pScreen);
|
|
||||||
else
|
|
||||||
KdDisableScreen (pScreen);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int KdCurScreen; /* current event screen */
|
int KdCurScreen; /* current event screen */
|
||||||
|
|
|
||||||
|
|
@ -280,7 +280,9 @@ ddxProcessArgument(int argc, char *argv[], int i)
|
||||||
int screenNum;
|
int screenNum;
|
||||||
CHECK_FOR_REQUIRED_ARGUMENTS(2);
|
CHECK_FOR_REQUIRED_ARGUMENTS(2);
|
||||||
screenNum = atoi(argv[i+1]);
|
screenNum = atoi(argv[i+1]);
|
||||||
if (screenNum < 0)
|
/* The protocol only has a CARD8 for number of screens in the
|
||||||
|
connection setup block, so don't allow more than that. */
|
||||||
|
if ((screenNum < 0) || (screenNum >= 255))
|
||||||
{
|
{
|
||||||
ErrorF("Invalid screen number %d\n", screenNum);
|
ErrorF("Invalid screen number %d\n", screenNum);
|
||||||
UseMsg();
|
UseMsg();
|
||||||
|
|
@ -864,6 +866,8 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
|
||||||
(1 << DirectColor)),
|
(1 << DirectColor)),
|
||||||
10, TrueColor, 0x3ff00000, 0x000ffc00, 0x000003ff);
|
10, TrueColor, 0x3ff00000, 0x000ffc00, 0x000003ff);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
miSetPixmapDepths ();
|
miSetPixmapDepths ();
|
||||||
|
|
|
||||||
|
|
@ -601,16 +601,15 @@ xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data)
|
||||||
InputHandlerProc
|
InputHandlerProc
|
||||||
xf86SetConsoleHandler(InputHandlerProc proc, pointer data)
|
xf86SetConsoleHandler(InputHandlerProc proc, pointer data)
|
||||||
{
|
{
|
||||||
static InputHandlerProc handler = NULL;
|
static IHPtr handler = NULL;
|
||||||
InputHandlerProc old_handler = handler;
|
IHPtr old_handler = handler;
|
||||||
|
|
||||||
if (old_handler)
|
if (old_handler)
|
||||||
xf86RemoveGeneralHandler(old_handler);
|
xf86RemoveGeneralHandler(old_handler);
|
||||||
|
|
||||||
xf86AddGeneralHandler(xf86Info.consoleFd, proc, data);
|
handler = xf86AddGeneralHandler(xf86Info.consoleFd, proc, data);
|
||||||
handler = proc;
|
|
||||||
|
|
||||||
return old_handler;
|
return (old_handler) ? old_handler->ihproc : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -221,6 +221,9 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
pScrn = xf86Screens[scrnIndex];
|
pScrn = xf86Screens[scrnIndex];
|
||||||
|
if (pScrn->modes == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
pVidMode = VMPTR(pScrn->pScreen);
|
pVidMode = VMPTR(pScrn->pScreen);
|
||||||
pVidMode->First = pScrn->modes;
|
pVidMode->First = pScrn->modes;
|
||||||
pVidMode->Next = pVidMode->First->next;
|
pVidMode->Next = pVidMode->First->next;
|
||||||
|
|
|
||||||
|
|
@ -939,15 +939,16 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs,
|
||||||
pInfo->attrs = DuplicateInputAttributes(attrs);
|
pInfo->attrs = DuplicateInputAttributes(attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pInfo->driver || !pInfo->name) {
|
if (!pInfo->name) {
|
||||||
xf86Msg(X_INFO, "No input driver/identifier specified (ignoring)\n");
|
xf86Msg(X_INFO, "No identifier specified, ignoring this device.\n");
|
||||||
rval = BadRequest;
|
rval = BadRequest;
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pInfo->name) {
|
if (!pInfo->driver) {
|
||||||
xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n");
|
xf86Msg(X_INFO, "No input driver specified, ignoring this device.\n");
|
||||||
rval = BadMatch;
|
xf86Msg(X_INFO, "This device may have been added with another device file.\n");
|
||||||
|
rval = BadRequest;
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -780,7 +780,8 @@ DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable)
|
||||||
/* If we're currently waiting for a swap on this drawable, reset
|
/* If we're currently waiting for a swap on this drawable, reset
|
||||||
* the request and suspend the client. We only support one
|
* the request and suspend the client. We only support one
|
||||||
* blocked client per drawable. */
|
* blocked client per drawable. */
|
||||||
if ((pPriv->swapsPending) &&
|
if (pPriv &&
|
||||||
|
pPriv->swapsPending &&
|
||||||
pPriv->blockedClient == NULL) {
|
pPriv->blockedClient == NULL) {
|
||||||
ResetCurrentRequest(client);
|
ResetCurrentRequest(client);
|
||||||
client->sequence--;
|
client->sequence--;
|
||||||
|
|
@ -1193,14 +1194,24 @@ DRI2CloseScreen(ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
extern ExtensionModule dri2ExtensionModule;
|
extern ExtensionModule dri2ExtensionModule;
|
||||||
|
extern Bool DRI2ModuleSetup(void);
|
||||||
|
|
||||||
|
/* Called by InitExtensions() */
|
||||||
|
Bool
|
||||||
|
DRI2ModuleSetup(void)
|
||||||
|
{
|
||||||
|
dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone, "DRI2Drawable");
|
||||||
|
if (!dri2DrawableRes)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static pointer
|
static pointer
|
||||||
DRI2Setup(pointer module, pointer opts, int *errmaj, int *errmin)
|
DRI2Setup(pointer module, pointer opts, int *errmaj, int *errmin)
|
||||||
{
|
{
|
||||||
static Bool setupDone = FALSE;
|
static Bool setupDone = FALSE;
|
||||||
|
|
||||||
dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone, "DRI2Drawable");
|
|
||||||
|
|
||||||
if (!setupDone)
|
if (!setupDone)
|
||||||
{
|
{
|
||||||
setupDone = TRUE;
|
setupDone = TRUE;
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@
|
||||||
#include "xf86Module.h"
|
#include "xf86Module.h"
|
||||||
|
|
||||||
static ExtensionEntry *dri2Extension;
|
static ExtensionEntry *dri2Extension;
|
||||||
|
extern Bool DRI2ModuleSetup(void);
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
validDrawable(ClientPtr client, XID drawable, Mask access_mode,
|
validDrawable(ClientPtr client, XID drawable, Mask access_mode,
|
||||||
|
|
@ -636,6 +637,8 @@ DRI2ExtensionInit(void)
|
||||||
StandardMinorOpcode);
|
StandardMinorOpcode);
|
||||||
|
|
||||||
DRI2EventBase = dri2Extension->eventBase;
|
DRI2EventBase = dri2Extension->eventBase;
|
||||||
|
|
||||||
|
DRI2ModuleSetup();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern Bool noDRI2Extension;
|
extern Bool noDRI2Extension;
|
||||||
|
|
|
||||||
|
|
@ -509,20 +509,22 @@ fbdevHWSetVideoModes(ScrnInfoPtr pScrn)
|
||||||
pScrn->virtualY = pScrn->display->virtualY;
|
pScrn->virtualY = pScrn->display->virtualY;
|
||||||
|
|
||||||
for (modename = pScrn->display->modes; *modename != NULL; modename++) {
|
for (modename = pScrn->display->modes; *modename != NULL; modename++) {
|
||||||
for (mode = pScrn->monitor->Modes; mode != NULL; mode = mode->next)
|
for (mode = pScrn->monitor->Modes; mode != NULL; mode = mode->next) {
|
||||||
if (0 == strcmp(mode->name,*modename))
|
if (0 == strcmp(mode->name,*modename)) {
|
||||||
break;
|
if (fbdevHWSetMode(pScrn, mode, TRUE))
|
||||||
|
break;
|
||||||
|
|
||||||
|
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||||
|
"\tmode \"%s\" test failed\n", *modename);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (NULL == mode) {
|
if (NULL == mode) {
|
||||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||||
"\tmode \"%s\" not found\n", *modename);
|
"\tmode \"%s\" not found\n", *modename);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fbdevHWSetMode(pScrn, mode, TRUE)) {
|
|
||||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
|
||||||
"\tmode \"%s\" test failed\n", *modename);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||||
"\tmode \"%s\" ok\n", *modename);
|
"\tmode \"%s\" ok\n", *modename);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -918,7 +918,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
|
||||||
goto LoadModule_fail;
|
goto LoadModule_fail;
|
||||||
}
|
}
|
||||||
ret->handle = LoaderOpen(found, errmaj, errmin);
|
ret->handle = LoaderOpen(found, errmaj, errmin);
|
||||||
if (ret->handle < 0)
|
if (ret->handle == NULL)
|
||||||
goto LoadModule_fail;
|
goto LoadModule_fail;
|
||||||
ret->path = strdup(found);
|
ret->path = strdup(found);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,7 @@ xf86CrtcCreate (ScrnInfoPtr scrn,
|
||||||
crtcs = malloc((xf86_config->num_crtc + 1) * sizeof (xf86CrtcPtr));
|
crtcs = malloc((xf86_config->num_crtc + 1) * sizeof (xf86CrtcPtr));
|
||||||
if (!crtcs)
|
if (!crtcs)
|
||||||
{
|
{
|
||||||
|
free(crtc->gamma_red);
|
||||||
free(crtc);
|
free(crtc);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
@ -1914,19 +1915,25 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scrn->modes != NULL) {
|
if (!scrn->modes) {
|
||||||
/* For some reason, scrn->modes is circular, unlike the other mode
|
scrn->modes = xf86ModesAdd(scrn->modes,
|
||||||
* lists. How great is that?
|
xf86CVTMode(scrn->display->virtualX,
|
||||||
*/
|
scrn->display->virtualY,
|
||||||
for (last = scrn->modes; last && last->next; last = last->next)
|
60, 0, 0));
|
||||||
;
|
|
||||||
last->next = scrn->modes;
|
|
||||||
scrn->modes->prev = last;
|
|
||||||
if (mode) {
|
|
||||||
while (scrn->modes != mode)
|
|
||||||
scrn->modes = scrn->modes->next;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* For some reason, scrn->modes is circular, unlike the other mode
|
||||||
|
* lists. How great is that?
|
||||||
|
*/
|
||||||
|
for (last = scrn->modes; last && last->next; last = last->next)
|
||||||
|
;
|
||||||
|
last->next = scrn->modes;
|
||||||
|
scrn->modes->prev = last;
|
||||||
|
if (mode) {
|
||||||
|
while (scrn->modes != mode)
|
||||||
|
scrn->modes = scrn->modes->next;
|
||||||
|
}
|
||||||
|
|
||||||
scrn->currentMode = scrn->modes;
|
scrn->currentMode = scrn->modes;
|
||||||
#ifdef XFreeXDGA
|
#ifdef XFreeXDGA
|
||||||
if (scrn->pScreen)
|
if (scrn->pScreen)
|
||||||
|
|
@ -2059,13 +2066,28 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
||||||
if (o == p)
|
if (o == p)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (mode = output->probed_modes; mode; mode = mode->next) {
|
/*
|
||||||
Rotation r = output->initial_rotation;
|
* First see if the preferred mode matches on the next
|
||||||
if (xf86ModeWidth(mode, r) == pref_width &&
|
* output as well. This catches the common case of identical
|
||||||
xf86ModeHeight(mode, r) == pref_height) {
|
* monitors and makes sure they all have the same timings
|
||||||
|
* and refresh. If that fails, we fall back to trying to
|
||||||
|
* match just width & height.
|
||||||
|
*/
|
||||||
|
mode = xf86OutputHasPreferredMode(output, pref_width,
|
||||||
|
pref_height);
|
||||||
|
if (mode && xf86ModesEqual(mode, preferred[p])) {
|
||||||
preferred[o] = mode;
|
preferred[o] = mode;
|
||||||
match = TRUE;
|
match = TRUE;
|
||||||
}
|
} else {
|
||||||
|
for (mode = output->probed_modes; mode;
|
||||||
|
mode = mode->next) {
|
||||||
|
Rotation r = output->initial_rotation;
|
||||||
|
if (xf86ModeWidth(mode, r) == pref_width &&
|
||||||
|
xf86ModeHeight(mode, r) == pref_height) {
|
||||||
|
preferred[o] = mode;
|
||||||
|
match = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
all_match &= match;
|
all_match &= match;
|
||||||
|
|
@ -2513,16 +2535,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
|
||||||
width, height);
|
width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (have_outputs) {
|
xf86SetScrnInfoModes (scrn);
|
||||||
/* Mirror output modes to scrn mode list */
|
|
||||||
xf86SetScrnInfoModes (scrn);
|
|
||||||
} else {
|
|
||||||
/* Clear any existing modes from scrn->modes */
|
|
||||||
while (scrn->modes != NULL)
|
|
||||||
xf86DeleteMode(&scrn->modes, scrn->modes);
|
|
||||||
scrn->modes = xf86ModesAdd(scrn->modes,
|
|
||||||
xf86CVTMode(width, height, 60, 0, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
success = TRUE;
|
success = TRUE;
|
||||||
bailout:
|
bailout:
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,11 @@ static Bool quirk_detailed_use_maximum_size (int scrnIndex, xf86MonPtr DDC)
|
||||||
DDC->vendor.prod_id == 6400)
|
DDC->vendor.prod_id == 6400)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* Bug #41141: Acer Aspire One */
|
||||||
|
if (memcmp (DDC->vendor.name, "LGD", 4) == 0 &&
|
||||||
|
DDC->vendor.prod_id == 0x7f01)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,15 +47,12 @@ static char vtname[11];
|
||||||
static struct termios tty_attr; /* tty state to restore */
|
static struct termios tty_attr; /* tty state to restore */
|
||||||
static int tty_mode; /* kbd mode to restore */
|
static int tty_mode; /* kbd mode to restore */
|
||||||
|
|
||||||
static void *console_handler;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
drain_console(int fd, void *closure)
|
drain_console(int fd, void *closure)
|
||||||
{
|
{
|
||||||
errno = 0;
|
errno = 0;
|
||||||
if (tcflush(fd, TCIOFLUSH) == -1 && errno == EIO) {
|
if (tcflush(fd, TCIOFLUSH) == -1 && errno == EIO) {
|
||||||
xf86RemoveGeneralHandler(console_handler);
|
xf86SetConsoleHandler(NULL, NULL);
|
||||||
console_handler = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -259,10 +256,11 @@ xf86CloseConsole(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (console_handler) {
|
/*
|
||||||
xf86RemoveGeneralHandler(console_handler);
|
* unregister the drain_console handler
|
||||||
console_handler = NULL;
|
* - what to do if someone else changed it in the meantime?
|
||||||
};
|
*/
|
||||||
|
xf86SetConsoleHandler(NULL, NULL);
|
||||||
|
|
||||||
/* Back to text mode ... */
|
/* Back to text mode ... */
|
||||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT));
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT));
|
||||||
|
|
|
||||||
|
|
@ -469,11 +469,11 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
||||||
static void
|
static void
|
||||||
unmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
|
unmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
|
||||||
{
|
{
|
||||||
memType alignOff = (memType)Base
|
uintptr_t alignOff = (uintptr_t)Base
|
||||||
- ((memType)Base & ~(getpagesize() - 1));
|
- ((uintptr_t)Base & ~(getpagesize() - 1));
|
||||||
|
|
||||||
DebugF("alignment offset: %lx\n",alignOff);
|
DebugF("alignment offset: %lx\n", (unsigned long)alignOff);
|
||||||
munmap((caddr_t)((memType)Base - alignOff), (Size + alignOff));
|
munmap((void *)((uintptr_t)Base - alignOff), (Size + alignOff));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1036,13 +1036,16 @@ VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data)
|
||||||
mode = xf86CVTMode(data->hsize, data->vsize, PANEL_HZ, 1, 0);
|
mode = xf86CVTMode(data->hsize, data->vsize, PANEL_HZ, 1, 0);
|
||||||
|
|
||||||
pScrn->monitor->nHsync = 1;
|
pScrn->monitor->nHsync = 1;
|
||||||
pScrn->monitor->hsync[0].lo = 31.5;
|
pScrn->monitor->hsync[0].lo = 29.37;
|
||||||
pScrn->monitor->hsync[0].hi = (float)mode->Clock / (float)mode->HTotal;
|
pScrn->monitor->hsync[0].hi = (float)mode->Clock / (float)mode->HTotal;
|
||||||
pScrn->monitor->nVrefresh = 1;
|
pScrn->monitor->nVrefresh = 1;
|
||||||
pScrn->monitor->vrefresh[0].lo = 56.0;
|
pScrn->monitor->vrefresh[0].lo = 56.0;
|
||||||
pScrn->monitor->vrefresh[0].hi =
|
pScrn->monitor->vrefresh[0].hi =
|
||||||
(float)mode->Clock*1000.0 / (float)mode->HTotal / (float)mode->VTotal;
|
(float)mode->Clock*1000.0 / (float)mode->HTotal / (float)mode->VTotal;
|
||||||
|
|
||||||
|
if (pScrn->monitor->vrefresh[0].hi < 59.47)
|
||||||
|
pScrn->monitor->vrefresh[0].hi = 59.47;
|
||||||
|
|
||||||
free(mode);
|
free(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -239,6 +239,7 @@ XAADestroyGC(GCPtr pGC)
|
||||||
free(pGCPriv->XAAOps);
|
free(pGCPriv->XAAOps);
|
||||||
|
|
||||||
free(pGCPriv->DashPattern);
|
free(pGCPriv->DashPattern);
|
||||||
|
pGCPriv->flags = 0;
|
||||||
|
|
||||||
(*pGC->funcs->DestroyGC)(pGC);
|
(*pGC->funcs->DestroyGC)(pGC);
|
||||||
XAA_GC_FUNC_EPILOGUE (pGC);
|
XAA_GC_FUNC_EPILOGUE (pGC);
|
||||||
|
|
|
||||||
|
|
@ -114,11 +114,13 @@ xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl)
|
||||||
int
|
int
|
||||||
xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
|
xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
|
||||||
{
|
{
|
||||||
|
XModifierKeymap *modifier_keymap;
|
||||||
KeySym *keymap;
|
KeySym *keymap;
|
||||||
int mapWidth;
|
int mapWidth;
|
||||||
int min_keycode, max_keycode;
|
int min_keycode, max_keycode;
|
||||||
KeySymsRec keySyms;
|
KeySymsRec keySyms;
|
||||||
int i;
|
CARD8 modmap[MAP_LENGTH];
|
||||||
|
int i, j;
|
||||||
XKeyboardState values;
|
XKeyboardState values;
|
||||||
XkbDescPtr xkb;
|
XkbDescPtr xkb;
|
||||||
int op, event, error, major, minor;
|
int op, event, error, major, minor;
|
||||||
|
|
@ -130,7 +132,7 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
|
||||||
#ifdef _XSERVER64
|
#ifdef _XSERVER64
|
||||||
{
|
{
|
||||||
KeySym64 *keymap64;
|
KeySym64 *keymap64;
|
||||||
int i, len;
|
int len;
|
||||||
keymap64 = XGetKeyboardMapping(xnestDisplay,
|
keymap64 = XGetKeyboardMapping(xnestDisplay,
|
||||||
min_keycode,
|
min_keycode,
|
||||||
max_keycode - min_keycode + 1,
|
max_keycode - min_keycode + 1,
|
||||||
|
|
@ -147,7 +149,17 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
|
||||||
max_keycode - min_keycode + 1,
|
max_keycode - min_keycode + 1,
|
||||||
&mapWidth);
|
&mapWidth);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
memset(modmap, 0, sizeof(modmap));
|
||||||
|
modifier_keymap = XGetModifierMapping(xnestDisplay);
|
||||||
|
for (j = 0; j < 8; j++)
|
||||||
|
for(i = 0; i < modifier_keymap->max_keypermod; i++) {
|
||||||
|
CARD8 keycode;
|
||||||
|
if ((keycode = modifier_keymap->modifiermap[j * modifier_keymap->max_keypermod + i]))
|
||||||
|
modmap[keycode] |= 1<<j;
|
||||||
|
}
|
||||||
|
XFreeModifiermap(modifier_keymap);
|
||||||
|
|
||||||
keySyms.minKeyCode = min_keycode;
|
keySyms.minKeyCode = min_keycode;
|
||||||
keySyms.maxKeyCode = max_keycode;
|
keySyms.maxKeyCode = max_keycode;
|
||||||
keySyms.mapWidth = mapWidth;
|
keySyms.mapWidth = mapWidth;
|
||||||
|
|
@ -165,7 +177,12 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
|
||||||
XkbGetControls(xnestDisplay, XkbAllControlsMask, xkb);
|
XkbGetControls(xnestDisplay, XkbAllControlsMask, xkb);
|
||||||
|
|
||||||
InitKeyboardDeviceStruct(pDev, NULL,
|
InitKeyboardDeviceStruct(pDev, NULL,
|
||||||
xnestBell, xnestChangeKeyboardControl);
|
xnestBell, xnestChangeKeyboardControl);
|
||||||
|
|
||||||
|
XkbApplyMappingChange(pDev, &keySyms, keySyms.minKeyCode,
|
||||||
|
keySyms.maxKeyCode - keySyms.minKeyCode + 1,
|
||||||
|
modmap, serverClient);
|
||||||
|
|
||||||
XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls);
|
XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls);
|
||||||
XkbFreeKeyboard(xkb, 0, False);
|
XkbFreeKeyboard(xkb, 0, False);
|
||||||
free(keymap);
|
free(keymap);
|
||||||
|
|
|
||||||
|
|
@ -356,7 +356,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
|
||||||
*/
|
*/
|
||||||
_appFlags._active = YES;
|
_appFlags._active = YES;
|
||||||
|
|
||||||
X11ApplicationSetFrontProcess();
|
[self set_front_process:nil];
|
||||||
|
|
||||||
/* Get the Spaces preference for SwitchOnActivate */
|
/* Get the Spaces preference for SwitchOnActivate */
|
||||||
(void)CFPreferencesAppSynchronize(CFSTR("com.apple.dock"));
|
(void)CFPreferencesAppSynchronize(CFSTR("com.apple.dock"));
|
||||||
|
|
|
||||||
|
|
@ -727,10 +727,12 @@ AppleWMExtensionInit(
|
||||||
NULL,
|
NULL,
|
||||||
StandardMinorOpcode)))
|
StandardMinorOpcode)))
|
||||||
{
|
{
|
||||||
|
size_t i;
|
||||||
WMReqCode = (unsigned char)extEntry->base;
|
WMReqCode = (unsigned char)extEntry->base;
|
||||||
WMErrorBase = extEntry->errorBase;
|
WMErrorBase = extEntry->errorBase;
|
||||||
WMEventBase = extEntry->eventBase;
|
WMEventBase = extEntry->eventBase;
|
||||||
EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent;
|
for (i=0; i < AppleWMNumberEvents; i++)
|
||||||
|
EventSwapVector[WMEventBase + i] = (EventSwapPtr) SNotifyEvent;
|
||||||
appleWMProcs = procsPtr;
|
appleWMProcs = procsPtr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.7.0</string>
|
<string>2.7.1</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>2.7.0</string>
|
<string>2.7.1</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>x11a</string>
|
<string>x11a</string>
|
||||||
<key>CSResourcesFileMapped</key>
|
<key>CSResourcesFileMapped</key>
|
||||||
|
|
@ -37,9 +37,9 @@
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.utilities</string>
|
<string>public.app-category.utilities</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>© 2003-2011 Apple Inc.
|
<string>© 2003-2012 Apple Inc.
|
||||||
© 2003 XFree86 Project, Inc.
|
© 2003 XFree86 Project, Inc.
|
||||||
© 2003-2011 X.org Foundation, Inc.
|
© 2003-2012 X.org Foundation, Inc.
|
||||||
</string>
|
</string>
|
||||||
<key>NSMainNibFile</key>
|
<key>NSMainNibFile</key>
|
||||||
<string>main</string>
|
<string>main</string>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ AM_CPPFLAGS=-F/System/Library/Frameworks/ApplicationServices.framework/Framework
|
||||||
-DBUNDLE_ID_PREFIX=\"$(BUNDLE_ID_PREFIX)\"
|
-DBUNDLE_ID_PREFIX=\"$(BUNDLE_ID_PREFIX)\"
|
||||||
|
|
||||||
AM_CFLAGS=$(XPBPROXY_CFLAGS)
|
AM_CFLAGS=$(XPBPROXY_CFLAGS)
|
||||||
|
AM_OBJCFLAGS=$(XPBPROXY_CFLAGS)
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libxpbproxy.la
|
noinst_LTLIBRARIES = libxpbproxy.la
|
||||||
libxpbproxy_la_SOURCES = \
|
libxpbproxy_la_SOURCES = \
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||||
Copyright 2000 VA Linux Systems, Inc.
|
Copyright 2000 VA Linux Systems, Inc.
|
||||||
Copyright (c) 2002, 2009 Apple Computer, Inc.
|
Copyright (c) 2002, 2009-2011 Apple Inc.
|
||||||
All Rights Reserved.
|
All Rights Reserved.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
|
@ -91,7 +91,6 @@ ProcAppleDRIQueryVersion(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
xAppleDRIQueryVersionReply rep;
|
xAppleDRIQueryVersionReply rep;
|
||||||
register int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xAppleDRIQueryVersionReq);
|
REQUEST_SIZE_MATCH(xAppleDRIQueryVersionReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
|
@ -101,8 +100,12 @@ ProcAppleDRIQueryVersion(
|
||||||
rep.minorVersion = SERVER_APPLEDRI_MINOR_VERSION;
|
rep.minorVersion = SERVER_APPLEDRI_MINOR_VERSION;
|
||||||
rep.patchVersion = SERVER_APPLEDRI_PATCH_VERSION;
|
rep.patchVersion = SERVER_APPLEDRI_PATCH_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
|
register int n;
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length, n);
|
||||||
|
swaps(&rep.majorVersion, n);
|
||||||
|
swaps(&rep.minorVersion, n);
|
||||||
|
swapl(&rep.patchVersion, n);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xAppleDRIQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xAppleDRIQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -134,6 +137,12 @@ ProcAppleDRIQueryDirectRenderingCapable(
|
||||||
if (!LocalClient(client))
|
if (!LocalClient(client))
|
||||||
rep.isCapable = 0;
|
rep.isCapable = 0;
|
||||||
|
|
||||||
|
if (client->swapped) {
|
||||||
|
register int n;
|
||||||
|
swaps(&rep.sequenceNumber, n);
|
||||||
|
swapl(&rep.length, n);
|
||||||
|
}
|
||||||
|
|
||||||
WriteToClient(client,
|
WriteToClient(client,
|
||||||
sizeof(xAppleDRIQueryDirectRenderingCapableReply), (char *)&rep);
|
sizeof(xAppleDRIQueryDirectRenderingCapableReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -158,6 +167,14 @@ ProcAppleDRIAuthConnection(
|
||||||
ErrorF("Failed to authenticate %u\n", (unsigned int)stuff->magic);
|
ErrorF("Failed to authenticate %u\n", (unsigned int)stuff->magic);
|
||||||
rep.authenticated = 0;
|
rep.authenticated = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (client->swapped) {
|
||||||
|
register int n;
|
||||||
|
swaps(&rep.sequenceNumber, n);
|
||||||
|
swapl(&rep.length, n);
|
||||||
|
swapl(&rep.authenticated, n); /* Yes, this is a CARD32 ... sigh */
|
||||||
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xAppleDRIAuthConnectionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xAppleDRIAuthConnectionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
@ -217,6 +234,15 @@ ProcAppleDRICreateSurface(
|
||||||
rep.key_1 = key[1];
|
rep.key_1 = key[1];
|
||||||
rep.uid = sid;
|
rep.uid = sid;
|
||||||
|
|
||||||
|
if (client->swapped) {
|
||||||
|
register int n;
|
||||||
|
swaps(&rep.sequenceNumber, n);
|
||||||
|
swapl(&rep.length, n);
|
||||||
|
swapl(&rep.key_0, n);
|
||||||
|
swapl(&rep.key_1, n);
|
||||||
|
swapl(&rep.uid, n);
|
||||||
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xAppleDRICreateSurfaceReply), (char *)&rep);
|
WriteToClient(client, sizeof(xAppleDRICreateSurfaceReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
@ -278,9 +304,8 @@ ProcAppleDRICreatePixmap(ClientPtr client)
|
||||||
|
|
||||||
rep.stringLength = strlen(path) + 1;
|
rep.stringLength = strlen(path) + 1;
|
||||||
|
|
||||||
/* No need for swapping, because this only runs if LocalClient is true. */
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = sizeof(rep) + rep.stringLength;
|
rep.length = bytes_to_int32(rep.stringLength);
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.width = width;
|
rep.width = width;
|
||||||
rep.height = height;
|
rep.height = height;
|
||||||
|
|
@ -291,8 +316,20 @@ ProcAppleDRICreatePixmap(ClientPtr client)
|
||||||
if(sizeof(rep) != sz_xAppleDRICreatePixmapReply)
|
if(sizeof(rep) != sz_xAppleDRICreatePixmapReply)
|
||||||
ErrorF("error sizeof(rep) is %zu\n", sizeof(rep));
|
ErrorF("error sizeof(rep) is %zu\n", sizeof(rep));
|
||||||
|
|
||||||
WriteReplyToClient(client, sizeof(rep), &rep);
|
if (client->swapped) {
|
||||||
(void)WriteToClient(client, rep.stringLength, path);
|
register int n;
|
||||||
|
swaps(&rep.sequenceNumber, n);
|
||||||
|
swapl(&rep.length, n);
|
||||||
|
swapl(&rep.stringLength, n);
|
||||||
|
swapl(&rep.width, n);
|
||||||
|
swapl(&rep.height, n);
|
||||||
|
swapl(&rep.pitch, n);
|
||||||
|
swapl(&rep.bpp, n);
|
||||||
|
swapl(&rep.size, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
WriteToClient(client, sizeof(rep), &rep);
|
||||||
|
WriteToClient(client, rep.stringLength, path);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
@ -378,6 +415,83 @@ SProcAppleDRIQueryVersion(
|
||||||
return ProcAppleDRIQueryVersion(client);
|
return ProcAppleDRIQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
SProcAppleDRIQueryDirectRenderingCapable(
|
||||||
|
register ClientPtr client
|
||||||
|
)
|
||||||
|
{
|
||||||
|
register int n;
|
||||||
|
REQUEST(xAppleDRIQueryDirectRenderingCapableReq);
|
||||||
|
swaps(&stuff->length, n);
|
||||||
|
swapl(&stuff->screen, n);
|
||||||
|
return ProcAppleDRIQueryDirectRenderingCapable(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
SProcAppleDRIAuthConnection(
|
||||||
|
register ClientPtr client
|
||||||
|
)
|
||||||
|
{
|
||||||
|
register int n;
|
||||||
|
REQUEST(xAppleDRIAuthConnectionReq);
|
||||||
|
swaps(&stuff->length, n);
|
||||||
|
swapl(&stuff->screen, n);
|
||||||
|
swapl(&stuff->magic, n);
|
||||||
|
return ProcAppleDRIAuthConnection(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
SProcAppleDRICreateSurface(
|
||||||
|
register ClientPtr client
|
||||||
|
)
|
||||||
|
{
|
||||||
|
register int n;
|
||||||
|
REQUEST(xAppleDRICreateSurfaceReq);
|
||||||
|
swaps(&stuff->length, n);
|
||||||
|
swapl(&stuff->screen, n);
|
||||||
|
swapl(&stuff->drawable, n);
|
||||||
|
swapl(&stuff->client_id, n);
|
||||||
|
return ProcAppleDRICreateSurface(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
SProcAppleDRIDestroySurface(
|
||||||
|
register ClientPtr client
|
||||||
|
)
|
||||||
|
{
|
||||||
|
register int n;
|
||||||
|
REQUEST(xAppleDRIDestroySurfaceReq);
|
||||||
|
swaps(&stuff->length, n);
|
||||||
|
swapl(&stuff->screen, n);
|
||||||
|
swapl(&stuff->drawable, n);
|
||||||
|
return ProcAppleDRIDestroySurface(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
SProcAppleDRICreatePixmap(
|
||||||
|
register ClientPtr client
|
||||||
|
)
|
||||||
|
{
|
||||||
|
register int n;
|
||||||
|
REQUEST(xAppleDRICreatePixmapReq);
|
||||||
|
swaps(&stuff->length, n);
|
||||||
|
swapl(&stuff->screen, n);
|
||||||
|
swapl(&stuff->drawable, n);
|
||||||
|
return ProcAppleDRICreatePixmap(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
SProcAppleDRIDestroyPixmap(
|
||||||
|
register ClientPtr client
|
||||||
|
)
|
||||||
|
{
|
||||||
|
register int n;
|
||||||
|
REQUEST(xAppleDRIDestroyPixmapReq);
|
||||||
|
swaps(&stuff->length, n);
|
||||||
|
swapl(&stuff->drawable, n);
|
||||||
|
return ProcAppleDRIDestroyPixmap(client);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcAppleDRIDispatch (
|
SProcAppleDRIDispatch (
|
||||||
register ClientPtr client
|
register ClientPtr client
|
||||||
|
|
@ -385,15 +499,30 @@ SProcAppleDRIDispatch (
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
|
||||||
/* It is bound to be non-local when there is byte swapping */
|
|
||||||
if (!LocalClient(client))
|
|
||||||
return DRIErrorBase + AppleDRIClientNotLocal;
|
|
||||||
|
|
||||||
/* only local clients are allowed DRI access */
|
|
||||||
switch (stuff->data)
|
switch (stuff->data)
|
||||||
{
|
{
|
||||||
case X_AppleDRIQueryVersion:
|
case X_AppleDRIQueryVersion:
|
||||||
return SProcAppleDRIQueryVersion(client);
|
return SProcAppleDRIQueryVersion(client);
|
||||||
|
case X_AppleDRIQueryDirectRenderingCapable:
|
||||||
|
return SProcAppleDRIQueryDirectRenderingCapable(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!LocalClient(client))
|
||||||
|
return DRIErrorBase + AppleDRIClientNotLocal;
|
||||||
|
|
||||||
|
switch (stuff->data)
|
||||||
|
{
|
||||||
|
case X_AppleDRIAuthConnection:
|
||||||
|
return SProcAppleDRIAuthConnection(client);
|
||||||
|
case X_AppleDRICreateSurface:
|
||||||
|
return SProcAppleDRICreateSurface(client);
|
||||||
|
case X_AppleDRIDestroySurface:
|
||||||
|
return SProcAppleDRIDestroySurface(client);
|
||||||
|
case X_AppleDRICreatePixmap:
|
||||||
|
return SProcAppleDRICreatePixmap(client);
|
||||||
|
case X_AppleDRIDestroyPixmap:
|
||||||
|
return SProcAppleDRIDestroyPixmap(client);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
}
|
}
|
||||||
|
|
@ -412,9 +541,11 @@ AppleDRIExtensionInit(void)
|
||||||
SProcAppleDRIDispatch,
|
SProcAppleDRIDispatch,
|
||||||
AppleDRIResetProc,
|
AppleDRIResetProc,
|
||||||
StandardMinorOpcode))) {
|
StandardMinorOpcode))) {
|
||||||
|
size_t i;
|
||||||
DRIReqCode = (unsigned char)extEntry->base;
|
DRIReqCode = (unsigned char)extEntry->base;
|
||||||
DRIErrorBase = extEntry->errorBase;
|
DRIErrorBase = extEntry->errorBase;
|
||||||
DRIEventBase = extEntry->eventBase;
|
DRIEventBase = extEntry->eventBase;
|
||||||
EventSwapVector[DRIEventBase] = (EventSwapPtr) SNotifyEvent;
|
for (i=0; i < AppleDRINumberEvents; i++)
|
||||||
|
EventSwapVector[DRIEventBase + i] = (EventSwapPtr) SNotifyEvent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -629,9 +629,11 @@ winWindowsWMExtensionInit (void)
|
||||||
NULL,
|
NULL,
|
||||||
StandardMinorOpcode)))
|
StandardMinorOpcode)))
|
||||||
{
|
{
|
||||||
|
size_t i;
|
||||||
WMReqCode = (unsigned char)extEntry->base;
|
WMReqCode = (unsigned char)extEntry->base;
|
||||||
WMErrorBase = extEntry->errorBase;
|
WMErrorBase = extEntry->errorBase;
|
||||||
WMEventBase = extEntry->eventBase;
|
WMEventBase = extEntry->eventBase;
|
||||||
EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent;
|
for (i=0; i < WindowsWMNumberEvents; i++)
|
||||||
|
EventSwapVector[WMEventBase + i] = (EventSwapPtr) SNotifyEvent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,7 @@ typedef struct _Client {
|
||||||
|
|
||||||
DeviceIntPtr clientPtr;
|
DeviceIntPtr clientPtr;
|
||||||
ClientIdPtr clientIds;
|
ClientIdPtr clientIds;
|
||||||
|
unsigned short majorOp, minorOp;
|
||||||
} ClientRec;
|
} ClientRec;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,6 @@ _XFUNCPROTOBEGIN
|
||||||
|
|
||||||
extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client*/);
|
extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client*/);
|
||||||
|
|
||||||
extern _X_EXPORT unsigned short MinorOpcodeOfRequest(ClientPtr /*client*/);
|
|
||||||
|
|
||||||
extern _X_EXPORT Bool EnableDisableExtension(char *name, Bool enable);
|
extern _X_EXPORT Bool EnableDisableExtension(char *name, Bool enable);
|
||||||
|
|
||||||
extern _X_EXPORT void EnableDisableExtensionError(char *name, Bool enable);
|
extern _X_EXPORT void EnableDisableExtensionError(char *name, Bool enable);
|
||||||
|
|
|
||||||
|
|
@ -464,13 +464,13 @@ extern _X_EXPORT void QueueKeyboardEvents(
|
||||||
int key_code,
|
int key_code,
|
||||||
const ValuatorMask *mask);
|
const ValuatorMask *mask);
|
||||||
|
|
||||||
extern int GetProximityEvents(
|
extern _X_EXPORT int GetProximityEvents(
|
||||||
InternalEvent *events,
|
InternalEvent *events,
|
||||||
DeviceIntPtr pDev,
|
DeviceIntPtr pDev,
|
||||||
int type,
|
int type,
|
||||||
const ValuatorMask *mask);
|
const ValuatorMask *mask);
|
||||||
|
|
||||||
extern void QueueProximityEvents(
|
extern _X_EXPORT void QueueProximityEvents(
|
||||||
DeviceIntPtr pDev,
|
DeviceIntPtr pDev,
|
||||||
int type,
|
int type,
|
||||||
const ValuatorMask *mask);
|
const ValuatorMask *mask);
|
||||||
|
|
|
||||||
|
|
@ -451,9 +451,10 @@ extern _X_EXPORT CallbackListPtr ReplyCallback;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ClientPtr client;
|
ClientPtr client;
|
||||||
const void *replyData;
|
const void *replyData;
|
||||||
unsigned long dataLenBytes;
|
unsigned long dataLenBytes; /* actual bytes from replyData + pad bytes */
|
||||||
unsigned long bytesRemaining;
|
unsigned long bytesRemaining;
|
||||||
Bool startOfReply;
|
Bool startOfReply;
|
||||||
|
unsigned long padBytes; /* pad bytes from zeroed array */
|
||||||
} ReplyInfoRec;
|
} ReplyInfoRec;
|
||||||
|
|
||||||
/* stuff for FlushCallback */
|
/* stuff for FlushCallback */
|
||||||
|
|
|
||||||
|
|
@ -648,7 +648,7 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h,
|
||||||
depth = pDraw->depth;
|
depth = pDraw->depth;
|
||||||
if(format == ZPixmap)
|
if(format == ZPixmap)
|
||||||
{
|
{
|
||||||
if ( (((1<<depth)-1)&planeMask) != (1<<depth)-1 )
|
if ( (((1LL<<depth)-1)&planeMask) != (1LL<<depth)-1 )
|
||||||
{
|
{
|
||||||
ChangeGCVal gcv;
|
ChangeGCVal gcv;
|
||||||
xPoint pt;
|
xPoint pt;
|
||||||
|
|
|
||||||
|
|
@ -247,8 +247,8 @@ RootlessComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
|
||||||
WindowPtr srcWin, dstWin, maskWin = NULL;
|
WindowPtr srcWin, dstWin, maskWin = NULL;
|
||||||
|
|
||||||
if (pMask) { // pMask can be NULL
|
if (pMask) { // pMask can be NULL
|
||||||
maskWin = (pMask->pDrawable->type == DRAWABLE_WINDOW) ?
|
maskWin = (pMask->pDrawable && pMask->pDrawable->type == DRAWABLE_WINDOW) ?
|
||||||
(WindowPtr)pMask->pDrawable : NULL;
|
(WindowPtr)pMask->pDrawable : NULL;
|
||||||
}
|
}
|
||||||
srcWin = (pSrc->pDrawable && pSrc->pDrawable->type == DRAWABLE_WINDOW) ?
|
srcWin = (pSrc->pDrawable && pSrc->pDrawable->type == DRAWABLE_WINDOW) ?
|
||||||
(WindowPtr)pSrc->pDrawable : NULL;
|
(WindowPtr)pSrc->pDrawable : NULL;
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,11 @@ void xorg_backtrace(void)
|
||||||
ErrorF("\nBacktrace:\n");
|
ErrorF("\nBacktrace:\n");
|
||||||
size = backtrace(array, 64);
|
size = backtrace(array, 64);
|
||||||
for (i = 0; i < size; i++) {
|
for (i = 0; i < size; i++) {
|
||||||
dladdr(array[i], &info);
|
int rc = dladdr(array[i], &info);
|
||||||
|
if (rc == 0) {
|
||||||
|
ErrorF("%d: ?? [%p]\n", i, array[i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
mod = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)";
|
mod = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)";
|
||||||
if (info.dli_saddr)
|
if (info.dli_saddr)
|
||||||
ErrorF("%d: %s (%s+0x%lx) [%p]\n", i, mod,
|
ErrorF("%d: %s (%s+0x%lx) [%p]\n", i, mod,
|
||||||
|
|
|
||||||
118
os/client.c
118
os/client.c
|
|
@ -59,6 +59,20 @@
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
|
|
||||||
|
#ifdef __sun
|
||||||
|
#include <errno.h>
|
||||||
|
#include <procfs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __OpenBSD__
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/sysctl.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#include <kvm.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to determine a PID for a client from its connection
|
* Try to determine a PID for a client from its connection
|
||||||
* information. This should be called only once when new client has
|
* information. This should be called only once when new client has
|
||||||
|
|
@ -117,8 +131,6 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs)
|
||||||
{
|
{
|
||||||
char path[PATH_MAX + 1];
|
char path[PATH_MAX + 1];
|
||||||
int totsize = 0;
|
int totsize = 0;
|
||||||
int cmdsize = 0;
|
|
||||||
int argsize = 0;
|
|
||||||
int fd = 0;
|
int fd = 0;
|
||||||
|
|
||||||
if (cmdname)
|
if (cmdname)
|
||||||
|
|
@ -129,6 +141,80 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs)
|
||||||
if (pid == -1)
|
if (pid == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifdef __sun /* Solaris */
|
||||||
|
/* Solaris does not support /proc/pid/cmdline, but makes information
|
||||||
|
* similar to what ps shows available in a binary structure in the
|
||||||
|
* /proc/pid/psinfo file. */
|
||||||
|
if (snprintf(path, sizeof(path), "/proc/%d/psinfo", pid) < 0)
|
||||||
|
return;
|
||||||
|
fd = open(path, O_RDONLY);
|
||||||
|
if (fd < 0)
|
||||||
|
{
|
||||||
|
ErrorF ("Failed to open %s: %s\n", path, strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
psinfo_t psinfo = { 0 };
|
||||||
|
char *sp;
|
||||||
|
|
||||||
|
totsize = read(fd, &psinfo, sizeof(psinfo_t));
|
||||||
|
close(fd);
|
||||||
|
if (totsize <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* pr_psargs is the first PRARGSZ (80) characters of the command
|
||||||
|
* line string - assume up to the first space is the command name,
|
||||||
|
* since it's not delimited. While there is also pr_fname, that's
|
||||||
|
* more limited, giving only the first 16 chars of the basename of
|
||||||
|
* the file that was exec'ed, thus cutting off many long gnome
|
||||||
|
* command names, or returning "isapython2.6" for all python scripts.
|
||||||
|
*/
|
||||||
|
psinfo.pr_psargs[PRARGSZ-1] = '\0';
|
||||||
|
sp = strchr(psinfo.pr_psargs, ' ');
|
||||||
|
if (sp)
|
||||||
|
*sp++ = '\0';
|
||||||
|
|
||||||
|
if (cmdname)
|
||||||
|
*cmdname = strdup(psinfo.pr_psargs);
|
||||||
|
|
||||||
|
if (cmdargs && sp)
|
||||||
|
*cmdargs = strdup(sp);
|
||||||
|
}
|
||||||
|
#elif defined(__OpenBSD__)
|
||||||
|
/* on OpenBSD use kvm_getargv() */
|
||||||
|
{
|
||||||
|
kvm_t *kd;
|
||||||
|
char errbuf[_POSIX2_LINE_MAX];
|
||||||
|
char **argv;
|
||||||
|
struct kinfo_proc *kp;
|
||||||
|
size_t len = 0;
|
||||||
|
int i, n;
|
||||||
|
|
||||||
|
kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, errbuf);
|
||||||
|
if (kd == NULL)
|
||||||
|
return;
|
||||||
|
kp = kvm_getprocs(kd, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), &n);
|
||||||
|
if (n != 1)
|
||||||
|
return;
|
||||||
|
argv = kvm_getargv(kd, kp, 0);
|
||||||
|
*cmdname = strdup(argv[0]);
|
||||||
|
i = 1;
|
||||||
|
while (argv[i] != NULL) {
|
||||||
|
len += strlen(argv[i]) + 1;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
*cmdargs = calloc(1, len);
|
||||||
|
i = 1;
|
||||||
|
while (argv[i] != NULL) {
|
||||||
|
strlcat(*cmdargs, argv[i], len);
|
||||||
|
strlcat(*cmdargs, " ", len);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
kvm_close(kd);
|
||||||
|
}
|
||||||
|
#else /* Linux using /proc/pid/cmdline */
|
||||||
|
|
||||||
/* Check if /proc/pid/cmdline exists. It's not supported on all
|
/* Check if /proc/pid/cmdline exists. It's not supported on all
|
||||||
* operating systems. */
|
* operating systems. */
|
||||||
if (snprintf(path, sizeof(path), "/proc/%d/cmdline", pid) < 0)
|
if (snprintf(path, sizeof(path), "/proc/%d/cmdline", pid) < 0)
|
||||||
|
|
@ -146,23 +232,20 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs)
|
||||||
path[totsize - 1] = '\0';
|
path[totsize - 1] = '\0';
|
||||||
|
|
||||||
/* Contruct the process name without arguments. */
|
/* Contruct the process name without arguments. */
|
||||||
cmdsize = strlen(path) + 1;
|
|
||||||
if (cmdname)
|
if (cmdname)
|
||||||
{
|
{
|
||||||
char *name = malloc(cmdsize);
|
*cmdname = strdup(path);
|
||||||
if (name)
|
|
||||||
{
|
|
||||||
strncpy(name, path, cmdsize);
|
|
||||||
name[cmdsize - 1] = '\0';
|
|
||||||
*cmdname = name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Construct the arguments for client process. */
|
/* Construct the arguments for client process. */
|
||||||
argsize = totsize - cmdsize;
|
if (cmdargs)
|
||||||
if (cmdargs && (argsize > 0))
|
|
||||||
{
|
{
|
||||||
char *args = malloc(argsize);
|
int cmdsize = strlen(path) + 1;
|
||||||
|
int argsize = totsize - cmdsize;
|
||||||
|
char *args = NULL;
|
||||||
|
|
||||||
|
if (argsize > 0)
|
||||||
|
args = malloc(argsize);
|
||||||
if (args)
|
if (args)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
@ -175,6 +258,7 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs)
|
||||||
*cmdargs = args;
|
*cmdargs = args;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -198,9 +282,9 @@ void ReserveClientIds(struct _Client *client)
|
||||||
DetermineClientCmd(client->clientIds->pid, &client->clientIds->cmdname, &client->clientIds->cmdargs);
|
DetermineClientCmd(client->clientIds->pid, &client->clientIds->cmdname, &client->clientIds->cmdargs);
|
||||||
|
|
||||||
DebugF("client(%lx): Reserved pid(%d).\n",
|
DebugF("client(%lx): Reserved pid(%d).\n",
|
||||||
client->clientAsMask, client->clientIds->pid);
|
(unsigned long) client->clientAsMask, client->clientIds->pid);
|
||||||
DebugF("client(%lx): Reserved cmdname(%s) and cmdargs(%s).\n",
|
DebugF("client(%lx): Reserved cmdname(%s) and cmdargs(%s).\n",
|
||||||
client->clientAsMask,
|
(unsigned long) client->clientAsMask,
|
||||||
client->clientIds->cmdname ? client->clientIds->cmdname : "NULL",
|
client->clientIds->cmdname ? client->clientIds->cmdname : "NULL",
|
||||||
client->clientIds->cmdargs ? client->clientIds->cmdargs : "NULL");
|
client->clientIds->cmdargs ? client->clientIds->cmdargs : "NULL");
|
||||||
#endif /* CLIENTIDS */
|
#endif /* CLIENTIDS */
|
||||||
|
|
@ -222,9 +306,9 @@ void ReleaseClientIds(struct _Client *client)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DebugF("client(%lx): Released pid(%d).\n",
|
DebugF("client(%lx): Released pid(%d).\n",
|
||||||
client->clientAsMask, client->clientIds->pid);
|
(unsigned long) client->clientAsMask, client->clientIds->pid);
|
||||||
DebugF("client(%lx): Released cmdline(%s) and cmdargs(%s).\n",
|
DebugF("client(%lx): Released cmdline(%s) and cmdargs(%s).\n",
|
||||||
client->clientAsMask,
|
(unsigned long) client->clientAsMask,
|
||||||
client->clientIds->cmdname ? client->clientIds->cmdname : "NULL",
|
client->clientIds->cmdname ? client->clientIds->cmdname : "NULL",
|
||||||
client->clientIds->cmdargs ? client->clientIds->cmdargs : "NULL");
|
client->clientIds->cmdargs ? client->clientIds->cmdargs : "NULL");
|
||||||
|
|
||||||
|
|
|
||||||
1
os/io.c
1
os/io.c
|
|
@ -810,6 +810,7 @@ WriteToClient (ClientPtr who, int count, const void *__buf)
|
||||||
replyinfo.client = who;
|
replyinfo.client = who;
|
||||||
replyinfo.replyData = buf;
|
replyinfo.replyData = buf;
|
||||||
replyinfo.dataLenBytes = count + padBytes;
|
replyinfo.dataLenBytes = count + padBytes;
|
||||||
|
replyinfo.padBytes = padBytes;
|
||||||
if (who->replyBytesRemaining)
|
if (who->replyBytesRemaining)
|
||||||
{ /* still sending data of an earlier reply */
|
{ /* still sending data of an earlier reply */
|
||||||
who->replyBytesRemaining -= count + padBytes;
|
who->replyBytesRemaining -= count + padBytes;
|
||||||
|
|
|
||||||
|
|
@ -295,7 +295,7 @@ LockServer(void)
|
||||||
FatalError("Could not create lock file in %s\n", tmp);
|
FatalError("Could not create lock file in %s\n", tmp);
|
||||||
(void) sprintf(pid_str, "%10ld\n", (long)getpid());
|
(void) sprintf(pid_str, "%10ld\n", (long)getpid());
|
||||||
(void) write(lfd, pid_str, 11);
|
(void) write(lfd, pid_str, 11);
|
||||||
(void) chmod(tmp, 0444);
|
(void) fchmod(lfd, 0444);
|
||||||
(void) close(lfd);
|
(void) close(lfd);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -316,7 +316,7 @@ LockServer(void)
|
||||||
/*
|
/*
|
||||||
* Read the pid from the existing file
|
* Read the pid from the existing file
|
||||||
*/
|
*/
|
||||||
lfd = open(LockFile, O_RDONLY);
|
lfd = open(LockFile, O_RDONLY|O_NOFOLLOW);
|
||||||
if (lfd < 0) {
|
if (lfd < 0) {
|
||||||
unlink(tmp);
|
unlink(tmp);
|
||||||
FatalError("Can't read lock file %s\n", LockFile);
|
FatalError("Can't read lock file %s\n", LockFile);
|
||||||
|
|
|
||||||
|
|
@ -1465,7 +1465,7 @@ RRConstrainCursorHarder(DeviceIntPtr pDev, ScreenPtr pScreen, int mode, int *x,
|
||||||
|
|
||||||
crtc_bounds(crtc, &left, &right, &top, &bottom);
|
crtc_bounds(crtc, &left, &right, &top, &bottom);
|
||||||
|
|
||||||
if ((*x >= left) && (*x <= right) && (*y >= top) && (*y <= bottom))
|
if ((*x >= left) && (*x < right) && (*y >= top) && (*y < bottom))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1481,24 +1481,15 @@ RRConstrainCursorHarder(DeviceIntPtr pDev, ScreenPtr pScreen, int mode, int *x,
|
||||||
crtc_bounds(crtc, &left, &right, &top, &bottom);
|
crtc_bounds(crtc, &left, &right, &top, &bottom);
|
||||||
miPointerGetPosition(pDev, &nx, &ny);
|
miPointerGetPosition(pDev, &nx, &ny);
|
||||||
|
|
||||||
if ((nx >= left) && (nx <= right) && (ny >= top) && (ny <= bottom)) {
|
if ((nx >= left) && (nx < right) && (ny >= top) && (ny < bottom)) {
|
||||||
if ((*x <= left) || (*x >= right)) {
|
if (*x < left)
|
||||||
int dx = *x - nx;
|
*x = left;
|
||||||
|
if (*x >= right)
|
||||||
if (dx > 0)
|
*x = right - 1;
|
||||||
*x = right;
|
if (*y < top)
|
||||||
else if (dx < 0)
|
*y = top;
|
||||||
*x = left;
|
if (*y >= bottom)
|
||||||
}
|
*y = bottom - 1;
|
||||||
|
|
||||||
if ((*y <= top) || (*y >= bottom)) {
|
|
||||||
int dy = *y - ny;
|
|
||||||
|
|
||||||
if (dy > 0)
|
|
||||||
*y = bottom;
|
|
||||||
else if (dy < 0)
|
|
||||||
*y = top;
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -269,8 +269,9 @@ RecordFlushReplyBuffer(
|
||||||
* device events and EndOfData, pClient is NULL.
|
* device events and EndOfData, pClient is NULL.
|
||||||
* category is the category of the protocol element, as defined
|
* category is the category of the protocol element, as defined
|
||||||
* by the RECORD spec.
|
* by the RECORD spec.
|
||||||
* data is a pointer to the protocol data, and datalen is its length
|
* data is a pointer to the protocol data, and datalen - padlen
|
||||||
* in bytes.
|
* is its length in bytes.
|
||||||
|
* padlen is the number of pad bytes from a zeroed array.
|
||||||
* futurelen is the number of bytes that will be sent in subsequent
|
* futurelen is the number of bytes that will be sent in subsequent
|
||||||
* calls to this function to complete this protocol element.
|
* calls to this function to complete this protocol element.
|
||||||
* In those subsequent calls, futurelen will be -1 to indicate
|
* In those subsequent calls, futurelen will be -1 to indicate
|
||||||
|
|
@ -290,7 +291,7 @@ RecordFlushReplyBuffer(
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient,
|
RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient,
|
||||||
int category, pointer data, int datalen, int futurelen)
|
int category, pointer data, int datalen, int padlen, int futurelen)
|
||||||
{
|
{
|
||||||
CARD32 elemHeaderData[2];
|
CARD32 elemHeaderData[2];
|
||||||
int numElemHeaders = 0;
|
int numElemHeaders = 0;
|
||||||
|
|
@ -399,15 +400,20 @@ RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient,
|
||||||
}
|
}
|
||||||
if (datalen)
|
if (datalen)
|
||||||
{
|
{
|
||||||
|
static char padBuffer[3]; /* as in FlushClient */
|
||||||
memcpy(pContext->replyBuffer + pContext->numBufBytes,
|
memcpy(pContext->replyBuffer + pContext->numBufBytes,
|
||||||
data, datalen);
|
data, datalen - padlen);
|
||||||
pContext->numBufBytes += datalen;
|
pContext->numBufBytes += datalen - padlen;
|
||||||
|
memcpy(pContext->replyBuffer + pContext->numBufBytes,
|
||||||
|
padBuffer, padlen);
|
||||||
|
pContext->numBufBytes += padlen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
RecordFlushReplyBuffer(pContext, (pointer)elemHeaderData,
|
RecordFlushReplyBuffer(pContext, (pointer)elemHeaderData,
|
||||||
numElemHeaders, (pointer)data, datalen);
|
numElemHeaders, (pointer)data, datalen - padlen);
|
||||||
|
}
|
||||||
} /* RecordAProtocolElement */
|
} /* RecordAProtocolElement */
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -485,19 +491,19 @@ RecordABigRequest(RecordContextPtr pContext, ClientPtr client, xReq *stuff)
|
||||||
/* record the request header */
|
/* record the request header */
|
||||||
bytesLeft = client->req_len << 2;
|
bytesLeft = client->req_len << 2;
|
||||||
RecordAProtocolElement(pContext, client, XRecordFromClient,
|
RecordAProtocolElement(pContext, client, XRecordFromClient,
|
||||||
(pointer)stuff, SIZEOF(xReq), bytesLeft);
|
(pointer)stuff, SIZEOF(xReq), 0, bytesLeft);
|
||||||
|
|
||||||
/* reinsert the extended length field that was squished out */
|
/* reinsert the extended length field that was squished out */
|
||||||
bigLength = client->req_len + bytes_to_int32(sizeof(bigLength));
|
bigLength = client->req_len + bytes_to_int32(sizeof(bigLength));
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl(&bigLength, n);
|
swapl(&bigLength, n);
|
||||||
RecordAProtocolElement(pContext, client, XRecordFromClient,
|
RecordAProtocolElement(pContext, client, XRecordFromClient,
|
||||||
(pointer)&bigLength, sizeof(bigLength), /* continuation */ -1);
|
(pointer)&bigLength, sizeof(bigLength), 0, /* continuation */ -1);
|
||||||
bytesLeft -= sizeof(bigLength);
|
bytesLeft -= sizeof(bigLength);
|
||||||
|
|
||||||
/* record the rest of the request after the length */
|
/* record the rest of the request after the length */
|
||||||
RecordAProtocolElement(pContext, client, XRecordFromClient,
|
RecordAProtocolElement(pContext, client, XRecordFromClient,
|
||||||
(pointer)(stuff + 1), bytesLeft, /* continuation */ -1);
|
(pointer)(stuff + 1), bytesLeft, 0, /* continuation */ -1);
|
||||||
} /* RecordABigRequest */
|
} /* RecordABigRequest */
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -544,11 +550,11 @@ RecordARequest(ClientPtr client)
|
||||||
RecordABigRequest(pContext, client, stuff);
|
RecordABigRequest(pContext, client, stuff);
|
||||||
else
|
else
|
||||||
RecordAProtocolElement(pContext, client, XRecordFromClient,
|
RecordAProtocolElement(pContext, client, XRecordFromClient,
|
||||||
(pointer)stuff, client->req_len << 2, 0);
|
(pointer)stuff, client->req_len << 2, 0, 0);
|
||||||
}
|
}
|
||||||
else /* extension, check minor opcode */
|
else /* extension, check minor opcode */
|
||||||
{
|
{
|
||||||
int minorop = MinorOpcodeOfRequest(client);
|
int minorop = client->minorOp;
|
||||||
int numMinOpInfo;
|
int numMinOpInfo;
|
||||||
RecordMinorOpPtr pMinorOpInfo = pRCAP->pRequestMinOpInfo;
|
RecordMinorOpPtr pMinorOpInfo = pRCAP->pRequestMinOpInfo;
|
||||||
|
|
||||||
|
|
@ -568,7 +574,7 @@ RecordARequest(ClientPtr client)
|
||||||
else
|
else
|
||||||
RecordAProtocolElement(pContext, client,
|
RecordAProtocolElement(pContext, client,
|
||||||
XRecordFromClient, (pointer)stuff,
|
XRecordFromClient, (pointer)stuff,
|
||||||
client->req_len << 2, 0);
|
client->req_len << 2, 0, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} /* end for each minor op info */
|
} /* end for each minor op info */
|
||||||
|
|
@ -605,12 +611,9 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
|
||||||
RecordContextPtr pContext;
|
RecordContextPtr pContext;
|
||||||
RecordClientsAndProtocolPtr pRCAP;
|
RecordClientsAndProtocolPtr pRCAP;
|
||||||
int eci;
|
int eci;
|
||||||
int majorop;
|
|
||||||
ReplyInfoRec *pri = (ReplyInfoRec *)calldata;
|
ReplyInfoRec *pri = (ReplyInfoRec *)calldata;
|
||||||
ClientPtr client = pri->client;
|
ClientPtr client = pri->client;
|
||||||
REQUEST(xReq);
|
|
||||||
|
|
||||||
majorop = stuff->reqType;
|
|
||||||
for (eci = 0; eci < numEnabledContexts; eci++)
|
for (eci = 0; eci < numEnabledContexts; eci++)
|
||||||
{
|
{
|
||||||
pContext = ppAllContexts[eci];
|
pContext = ppAllContexts[eci];
|
||||||
|
|
@ -618,10 +621,12 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
|
||||||
NULL);
|
NULL);
|
||||||
if (pRCAP)
|
if (pRCAP)
|
||||||
{
|
{
|
||||||
|
int majorop = client->majorOp;
|
||||||
if (pContext->continuedReply)
|
if (pContext->continuedReply)
|
||||||
{
|
{
|
||||||
RecordAProtocolElement(pContext, client, XRecordFromServer,
|
RecordAProtocolElement(pContext, client, XRecordFromServer,
|
||||||
(pointer)pri->replyData, pri->dataLenBytes, /* continuation */ -1);
|
(pointer)pri->replyData, pri->dataLenBytes,
|
||||||
|
pri->padBytes, /* continuation */ -1);
|
||||||
if (!pri->bytesRemaining)
|
if (!pri->bytesRemaining)
|
||||||
pContext->continuedReply = 0;
|
pContext->continuedReply = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -631,13 +636,13 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
|
||||||
if (majorop <= 127)
|
if (majorop <= 127)
|
||||||
{ /* core reply */
|
{ /* core reply */
|
||||||
RecordAProtocolElement(pContext, client, XRecordFromServer,
|
RecordAProtocolElement(pContext, client, XRecordFromServer,
|
||||||
(pointer)pri->replyData, pri->dataLenBytes, pri->bytesRemaining);
|
(pointer)pri->replyData, pri->dataLenBytes, 0, pri->bytesRemaining);
|
||||||
if (pri->bytesRemaining)
|
if (pri->bytesRemaining)
|
||||||
pContext->continuedReply = 1;
|
pContext->continuedReply = 1;
|
||||||
}
|
}
|
||||||
else /* extension, check minor opcode */
|
else /* extension, check minor opcode */
|
||||||
{
|
{
|
||||||
int minorop = MinorOpcodeOfRequest(client);
|
int minorop = client->minorOp;
|
||||||
int numMinOpInfo;
|
int numMinOpInfo;
|
||||||
RecordMinorOpPtr pMinorOpInfo = pRCAP->pReplyMinOpInfo;
|
RecordMinorOpPtr pMinorOpInfo = pRCAP->pReplyMinOpInfo;
|
||||||
assert (pMinorOpInfo);
|
assert (pMinorOpInfo);
|
||||||
|
|
@ -653,7 +658,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
|
||||||
{
|
{
|
||||||
RecordAProtocolElement(pContext, client,
|
RecordAProtocolElement(pContext, client,
|
||||||
XRecordFromServer, (pointer)pri->replyData,
|
XRecordFromServer, (pointer)pri->replyData,
|
||||||
pri->dataLenBytes, pri->bytesRemaining);
|
pri->dataLenBytes, 0, pri->bytesRemaining);
|
||||||
if (pri->bytesRemaining)
|
if (pri->bytesRemaining)
|
||||||
pContext->continuedReply = 1;
|
pContext->continuedReply = 1;
|
||||||
break;
|
break;
|
||||||
|
|
@ -725,7 +730,7 @@ RecordADeliveredEventOrError(CallbackListPtr *pcbl, pointer nulldata, pointer ca
|
||||||
|
|
||||||
}
|
}
|
||||||
RecordAProtocolElement(pContext, pClient,
|
RecordAProtocolElement(pContext, pClient,
|
||||||
XRecordFromServer, pEvToRecord, SIZEOF(xEvent), 0);
|
XRecordFromServer, pEvToRecord, SIZEOF(xEvent), 0, 0);
|
||||||
}
|
}
|
||||||
} /* end for each event */
|
} /* end for each event */
|
||||||
} /* end this client is on this context */
|
} /* end this client is on this context */
|
||||||
|
|
@ -776,7 +781,7 @@ RecordSendProtocolEvents(RecordClientsAndProtocolPtr pRCAP,
|
||||||
}
|
}
|
||||||
|
|
||||||
RecordAProtocolElement(pContext, NULL,
|
RecordAProtocolElement(pContext, NULL,
|
||||||
XRecordFromServer, pEvToRecord, SIZEOF(xEvent), 0);
|
XRecordFromServer, pEvToRecord, SIZEOF(xEvent), 0, 0);
|
||||||
/* make sure device events get flushed in the absence
|
/* make sure device events get flushed in the absence
|
||||||
* of other client activity
|
* of other client activity
|
||||||
*/
|
*/
|
||||||
|
|
@ -2420,7 +2425,7 @@ ProcRecordEnableContext(ClientPtr client)
|
||||||
assert(numEnabledContexts > 0);
|
assert(numEnabledContexts > 0);
|
||||||
|
|
||||||
/* send StartOfData */
|
/* send StartOfData */
|
||||||
RecordAProtocolElement(pContext, NULL, XRecordStartOfData, NULL, 0, 0);
|
RecordAProtocolElement(pContext, NULL, XRecordStartOfData, NULL, 0, 0, 0);
|
||||||
RecordFlushReplyBuffer(pContext, NULL, 0, NULL, 0);
|
RecordFlushReplyBuffer(pContext, NULL, 0, NULL, 0);
|
||||||
return Success;
|
return Success;
|
||||||
} /* ProcRecordEnableContext */
|
} /* ProcRecordEnableContext */
|
||||||
|
|
@ -2451,7 +2456,7 @@ RecordDisableContext(RecordContextPtr pContext)
|
||||||
if (!pContext->pRecordingClient) return;
|
if (!pContext->pRecordingClient) return;
|
||||||
if (!pContext->pRecordingClient->clientGone)
|
if (!pContext->pRecordingClient->clientGone)
|
||||||
{
|
{
|
||||||
RecordAProtocolElement(pContext, NULL, XRecordEndOfData, NULL, 0, 0);
|
RecordAProtocolElement(pContext, NULL, XRecordEndOfData, NULL, 0, 0, 0);
|
||||||
RecordFlushReplyBuffer(pContext, NULL, 0, NULL, 0);
|
RecordFlushReplyBuffer(pContext, NULL, 0, NULL, 0);
|
||||||
/* Re-enable request processing on this connection. */
|
/* Re-enable request processing on this connection. */
|
||||||
AttendClient(pContext->pRecordingClient);
|
AttendClient(pContext->pRecordingClient);
|
||||||
|
|
@ -2775,7 +2780,7 @@ RecordConnectionSetupInfo(RecordContextPtr pContext, NewClientInfoRec *pci)
|
||||||
SwapConnSetupPrefix(pci->prefix, (xConnSetupPrefix*)pConnSetup);
|
SwapConnSetupPrefix(pci->prefix, (xConnSetupPrefix*)pConnSetup);
|
||||||
SwapConnSetupInfo((char*)pci->setup, (char*)(pConnSetup + prefixsize));
|
SwapConnSetupInfo((char*)pci->setup, (char*)(pConnSetup + prefixsize));
|
||||||
RecordAProtocolElement(pContext, pci->client, XRecordClientStarted,
|
RecordAProtocolElement(pContext, pci->client, XRecordClientStarted,
|
||||||
(pointer)pConnSetup, prefixsize + restsize, 0);
|
(pointer)pConnSetup, prefixsize + restsize, 0, 0);
|
||||||
free(pConnSetup);
|
free(pConnSetup);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -2784,9 +2789,9 @@ RecordConnectionSetupInfo(RecordContextPtr pContext, NewClientInfoRec *pci)
|
||||||
* data in two pieces
|
* data in two pieces
|
||||||
*/
|
*/
|
||||||
RecordAProtocolElement(pContext, pci->client, XRecordClientStarted,
|
RecordAProtocolElement(pContext, pci->client, XRecordClientStarted,
|
||||||
(pointer)pci->prefix, prefixsize, restsize);
|
(pointer)pci->prefix, prefixsize, 0, restsize);
|
||||||
RecordAProtocolElement(pContext, pci->client, XRecordClientStarted,
|
RecordAProtocolElement(pContext, pci->client, XRecordClientStarted,
|
||||||
(pointer)pci->setup, restsize, /* continuation */ -1);
|
(pointer)pci->setup, restsize, 0, /* continuation */ -1);
|
||||||
}
|
}
|
||||||
} /* RecordConnectionSetupInfo */
|
} /* RecordConnectionSetupInfo */
|
||||||
|
|
||||||
|
|
@ -2863,7 +2868,7 @@ RecordAClientStateChange(CallbackListPtr *pcbl, pointer nulldata, pointer callda
|
||||||
{
|
{
|
||||||
if (pContext->pRecordingClient && pRCAP->clientDied)
|
if (pContext->pRecordingClient && pRCAP->clientDied)
|
||||||
RecordAProtocolElement(pContext, pClient,
|
RecordAProtocolElement(pContext, pClient,
|
||||||
XRecordClientDied, NULL, 0, 0);
|
XRecordClientDied, NULL, 0, 0, 0);
|
||||||
RecordDeleteClientFromRCAP(pRCAP, pos);
|
RecordDeleteClientFromRCAP(pRCAP, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,9 @@ AnimCurDisplayCursor (DeviceIntPtr pDev,
|
||||||
AnimCurScreenPtr as = GetAnimCurScreen(pScreen);
|
AnimCurScreenPtr as = GetAnimCurScreen(pScreen);
|
||||||
Bool ret;
|
Bool ret;
|
||||||
|
|
||||||
|
if (IsFloating(pDev))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
Unwrap (as, pScreen, DisplayCursor);
|
Unwrap (as, pScreen, DisplayCursor);
|
||||||
if (IsAnimCur(pCursor))
|
if (IsAnimCur(pCursor))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1223,7 +1223,7 @@ static void dix_valuator_alloc(void)
|
||||||
|
|
||||||
assert(v);
|
assert(v);
|
||||||
assert(v->numAxes == num_axes);
|
assert(v->numAxes == num_axes);
|
||||||
#ifndef __i386__
|
#if !defined(__i386__) && !defined(__sh__)
|
||||||
/* must be double-aligned on 64 bit */
|
/* must be double-aligned on 64 bit */
|
||||||
assert(((void*)v->axisVal - (void*)v) % sizeof(double) == 0);
|
assert(((void*)v->axisVal - (void*)v) % sizeof(double) == 0);
|
||||||
assert(((void*)v->axes - (void*)v) % sizeof(double) == 0);
|
assert(((void*)v->axes - (void*)v) % sizeof(double) == 0);
|
||||||
|
|
|
||||||
|
|
@ -179,9 +179,9 @@ CursorDisplayCursor (DeviceIntPtr pDev,
|
||||||
ev.type = XFixesEventBase + XFixesCursorNotify;
|
ev.type = XFixesEventBase + XFixesCursorNotify;
|
||||||
ev.subtype = XFixesDisplayCursorNotify;
|
ev.subtype = XFixesDisplayCursorNotify;
|
||||||
ev.window = e->pWindow->drawable.id;
|
ev.window = e->pWindow->drawable.id;
|
||||||
ev.cursorSerial = pCursor->serialNumber;
|
ev.cursorSerial = pCursor ? pCursor->serialNumber : 0;
|
||||||
ev.timestamp = currentTime.milliseconds;
|
ev.timestamp = currentTime.milliseconds;
|
||||||
ev.name = pCursor->name;
|
ev.name = pCursor ? pCursor->name : None;
|
||||||
WriteEventsToClient (e->pClient, 1, (xEvent *) &ev);
|
WriteEventsToClient (e->pClient, 1, (xEvent *) &ev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6240,6 +6240,9 @@ char * str;
|
||||||
swaps(&rep.unsupported,n);
|
swaps(&rep.unsupported,n);
|
||||||
swaps(&rep.nDeviceLedFBs,n);
|
swaps(&rep.nDeviceLedFBs,n);
|
||||||
swapl(&rep.type,n);
|
swapl(&rep.type,n);
|
||||||
|
swaps(&rep.dfltKbdFB, n);
|
||||||
|
swaps(&rep.dfltLedFB, n);
|
||||||
|
swapl(&rep.devType, n);
|
||||||
}
|
}
|
||||||
WriteToClient(client,SIZEOF(xkbGetDeviceInfoReply), (char *)&rep);
|
WriteToClient(client,SIZEOF(xkbGetDeviceInfoReply), (char *)&rep);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue