aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/Xext/xace.c170
-rw-r--r--xorg-server/Xi/exevents.c6
-rw-r--r--xorg-server/configure.ac4
-rw-r--r--xorg-server/dix/devices.c8
-rw-r--r--xorg-server/dix/dixfonts.c101
-rw-r--r--xorg-server/dix/getevents.c10
-rw-r--r--xorg-server/doc/xml/Xserver-spec.xml152
-rw-r--r--xorg-server/doc/xml/xmlrules.in2
-rw-r--r--xorg-server/fb/fbpict.c24
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.c3
-rw-r--r--xorg-server/hw/xfree86/parser/Input.c7
-rw-r--r--xorg-server/hw/xfree86/parser/InputClass.c6
-rw-r--r--xorg-server/hw/xwin/glx/indirect.c4
-rw-r--r--xorg-server/include/closestr.h307
-rw-r--r--xorg-server/include/input.h6
-rw-r--r--xorg-server/include/privates.h4
-rw-r--r--xorg-server/miext/rootless/rootlessCommon.c3
-rw-r--r--xorg-server/xkb/xkbActions.c95
-rw-r--r--xorg-server/xkeyboard-config/rules/base.extras.xml.in16
-rw-r--r--xorg-server/xkeyboard-config/rules/extras/variantsMapping.lst1
-rw-r--r--xorg-server/xkeyboard-config/symbols/extras/Makefile.am2
-rw-r--r--xorg-server/xkeyboard-config/symbols/extras/makefile2
-rw-r--r--xorg-server/xkeyboard-config/symbols/extras/ru59
-rw-r--r--xorg-server/xkeyboard-config/symbols/inet5
24 files changed, 559 insertions, 438 deletions
diff --git a/xorg-server/Xext/xace.c b/xorg-server/Xext/xace.c
index 48c5fb644..77b713ffb 100644
--- a/xorg-server/Xext/xace.c
+++ b/xorg-server/Xext/xace.c
@@ -89,7 +89,18 @@ void XaceHookAuditEnd(ClientPtr ptr, int result)
*/
int XaceHook(int hook, ...)
{
- pointer calldata; /* data passed to callback */
+ union {
+ XaceResourceAccessRec res;
+ XaceDeviceAccessRec dev;
+ XaceSendAccessRec send;
+ XaceReceiveAccessRec recv;
+ XaceClientAccessRec client;
+ XaceExtAccessRec ext;
+ XaceServerAccessRec server;
+ XaceScreenAccessRec screen;
+ XaceAuthAvailRec auth;
+ XaceKeyAvailRec key;
+ } u;
int *prv = NULL; /* points to return value from callback */
va_list ap; /* argument list */
va_start(ap, hook);
@@ -101,117 +112,86 @@ int XaceHook(int hook, ...)
*/
switch (hook)
{
- case XACE_RESOURCE_ACCESS: {
- XaceResourceAccessRec rec;
- rec.client = va_arg(ap, ClientPtr);
- rec.id = va_arg(ap, XID);
- rec.rtype = va_arg(ap, RESTYPE);
- rec.res = va_arg(ap, pointer);
- rec.ptype = va_arg(ap, RESTYPE);
- rec.parent = va_arg(ap, pointer);
- rec.access_mode = va_arg(ap, Mask);
- rec.status = Success; /* default allow */
- calldata = &rec;
- prv = &rec.status;
+ case XACE_RESOURCE_ACCESS:
+ u.res.client = va_arg(ap, ClientPtr);
+ u.res.id = va_arg(ap, XID);
+ u.res.rtype = va_arg(ap, RESTYPE);
+ u.res.res = va_arg(ap, pointer);
+ u.res.ptype = va_arg(ap, RESTYPE);
+ u.res.parent = va_arg(ap, pointer);
+ u.res.access_mode = va_arg(ap, Mask);
+ u.res.status = Success; /* default allow */
+ prv = &u.res.status;
break;
- }
- case XACE_DEVICE_ACCESS: {
- XaceDeviceAccessRec rec;
- rec.client = va_arg(ap, ClientPtr);
- rec.dev = va_arg(ap, DeviceIntPtr);
- rec.access_mode = va_arg(ap, Mask);
- rec.status = Success; /* default allow */
- calldata = &rec;
- prv = &rec.status;
+ case XACE_DEVICE_ACCESS:
+ u.dev.client = va_arg(ap, ClientPtr);
+ u.dev.dev = va_arg(ap, DeviceIntPtr);
+ u.dev.access_mode = va_arg(ap, Mask);
+ u.dev.status = Success; /* default allow */
+ prv = &u.dev.status;
break;
- }
- case XACE_SEND_ACCESS: {
- XaceSendAccessRec rec;
- rec.client = va_arg(ap, ClientPtr);
- rec.dev = va_arg(ap, DeviceIntPtr);
- rec.pWin = va_arg(ap, WindowPtr);
- rec.events = va_arg(ap, xEventPtr);
- rec.count = va_arg(ap, int);
- rec.status = Success; /* default allow */
- calldata = &rec;
- prv = &rec.status;
+ case XACE_SEND_ACCESS:
+ u.send.client = va_arg(ap, ClientPtr);
+ u.send.dev = va_arg(ap, DeviceIntPtr);
+ u.send.pWin = va_arg(ap, WindowPtr);
+ u.send.events = va_arg(ap, xEventPtr);
+ u.send.count = va_arg(ap, int);
+ u.send.status = Success; /* default allow */
+ prv = &u.send.status;
break;
- }
- case XACE_RECEIVE_ACCESS: {
- XaceReceiveAccessRec rec;
- rec.client = va_arg(ap, ClientPtr);
- rec.pWin = va_arg(ap, WindowPtr);
- rec.events = va_arg(ap, xEventPtr);
- rec.count = va_arg(ap, int);
- rec.status = Success; /* default allow */
- calldata = &rec;
- prv = &rec.status;
+ case XACE_RECEIVE_ACCESS:
+ u.recv.client = va_arg(ap, ClientPtr);
+ u.recv.pWin = va_arg(ap, WindowPtr);
+ u.recv.events = va_arg(ap, xEventPtr);
+ u.recv.count = va_arg(ap, int);
+ u.recv.status = Success; /* default allow */
+ prv = &u.recv.status;
break;
- }
- case XACE_CLIENT_ACCESS: {
- XaceClientAccessRec rec;
- rec.client = va_arg(ap, ClientPtr);
- rec.target = va_arg(ap, ClientPtr);
- rec.access_mode = va_arg(ap, Mask);
- rec.status = Success; /* default allow */
- calldata = &rec;
- prv = &rec.status;
+ case XACE_CLIENT_ACCESS:
+ u.client.client = va_arg(ap, ClientPtr);
+ u.client.target = va_arg(ap, ClientPtr);
+ u.client.access_mode = va_arg(ap, Mask);
+ u.client.status = Success; /* default allow */
+ prv = &u.client.status;
break;
- }
- case XACE_EXT_ACCESS: {
- XaceExtAccessRec rec;
- rec.client = va_arg(ap, ClientPtr);
- rec.ext = va_arg(ap, ExtensionEntry*);
- rec.access_mode = DixGetAttrAccess;
- rec.status = Success; /* default allow */
- calldata = &rec;
- prv = &rec.status;
+ case XACE_EXT_ACCESS:
+ u.ext.client = va_arg(ap, ClientPtr);
+ u.ext.ext = va_arg(ap, ExtensionEntry*);
+ u.ext.access_mode = DixGetAttrAccess;
+ u.ext.status = Success; /* default allow */
+ prv = &u.ext.status;
break;
- }
- case XACE_SERVER_ACCESS: {
- XaceServerAccessRec rec;
- rec.client = va_arg(ap, ClientPtr);
- rec.access_mode = va_arg(ap, Mask);
- rec.status = Success; /* default allow */
- calldata = &rec;
- prv = &rec.status;
+ case XACE_SERVER_ACCESS:
+ u.server.client = va_arg(ap, ClientPtr);
+ u.server.access_mode = va_arg(ap, Mask);
+ u.server.status = Success; /* default allow */
+ prv = &u.server.status;
break;
- }
case XACE_SCREEN_ACCESS:
- case XACE_SCREENSAVER_ACCESS: {
- XaceScreenAccessRec rec;
- rec.client = va_arg(ap, ClientPtr);
- rec.screen = va_arg(ap, ScreenPtr);
- rec.access_mode = va_arg(ap, Mask);
- rec.status = Success; /* default allow */
- calldata = &rec;
- prv = &rec.status;
+ case XACE_SCREENSAVER_ACCESS:
+ u.screen.client = va_arg(ap, ClientPtr);
+ u.screen.screen = va_arg(ap, ScreenPtr);
+ u.screen.access_mode = va_arg(ap, Mask);
+ u.screen.status = Success; /* default allow */
+ prv = &u.screen.status;
break;
- }
- case XACE_AUTH_AVAIL: {
- XaceAuthAvailRec rec;
- rec.client = va_arg(ap, ClientPtr);
- rec.authId = va_arg(ap, XID);
- calldata = &rec;
+ case XACE_AUTH_AVAIL:
+ u.auth.client = va_arg(ap, ClientPtr);
+ u.auth.authId = va_arg(ap, XID);
break;
- }
- case XACE_KEY_AVAIL: {
- XaceKeyAvailRec rec;
- rec.event = va_arg(ap, xEventPtr);
- rec.keybd = va_arg(ap, DeviceIntPtr);
- rec.count = va_arg(ap, int);
- calldata = &rec;
+ case XACE_KEY_AVAIL:
+ u.key.event = va_arg(ap, xEventPtr);
+ u.key.keybd = va_arg(ap, DeviceIntPtr);
+ u.key.count = va_arg(ap, int);
break;
- }
- default: {
+ default:
va_end(ap);
return 0; /* unimplemented hook number */
- }
}
va_end(ap);
/* call callbacks and return result, if any. */
- CallCallbacks(&XaceHooks[hook], calldata);
+ CallCallbacks(&XaceHooks[hook], &u);
return prv ? *prv : Success;
}
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index 734d4171c..1fc62968c 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -225,6 +225,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
{
classes = to->unused_classes;
to->intfeed = classes->intfeed;
+ classes->intfeed = NULL;
}
i = &to->intfeed;
@@ -260,6 +261,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
{
classes = to->unused_classes;
to->stringfeed = classes->stringfeed;
+ classes->stringfeed = NULL;
}
s = &to->stringfeed;
@@ -295,6 +297,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
{
classes = to->unused_classes;
to->bell = classes->bell;
+ classes->bell = NULL;
}
b = &to->bell;
@@ -331,6 +334,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to)
{
classes = to->unused_classes;
to->leds = classes->leds;
+ classes->leds = NULL;
}
l = &to->leds;
@@ -381,6 +385,7 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to)
to->kbdfeed = classes->kbdfeed;
if (!to->kbdfeed)
InitKeyboardDeviceStruct(to, NULL, NULL, NULL);
+ classes->kbdfeed = NULL;
}
k = &to->kbdfeed;
@@ -508,6 +513,7 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
{
classes = to->unused_classes;
to->ptrfeed = classes->ptrfeed;
+ classes->ptrfeed = NULL;
}
p = &to->ptrfeed;
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac
index 50313b616..14b4f1bb2 100644
--- a/xorg-server/configure.ac
+++ b/xorg-server/configure.ac
@@ -26,8 +26,8 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.8.99.905, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2010-07-14"
+AC_INIT([xorg-server], 1.8.99.906, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2010-08-12"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index d9a59d8db..625fd3aaa 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -2119,9 +2119,6 @@ ProcChangePointerControl(ClientPtr client)
REQUEST(xChangePointerControlReq);
REQUEST_SIZE_MATCH(xChangePointerControlReq);
- if (!mouse->ptrfeed->CtrlProc)
- return BadDevice;
-
ctrl = mouse->ptrfeed->ctrl;
if ((stuff->doAccel != xTrue) && (stuff->doAccel != xFalse)) {
client->errorValue = stuff->doAccel;
@@ -2169,7 +2166,7 @@ ProcChangePointerControl(ClientPtr client)
for (dev = inputInfo.devices; dev; dev = dev->next) {
if ((dev == mouse || (!IsMaster(dev) && dev->u.master == mouse)) &&
- dev->ptrfeed && dev->ptrfeed->CtrlProc) {
+ dev->ptrfeed) {
rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess);
if (rc != Success)
return rc;
@@ -2178,9 +2175,8 @@ ProcChangePointerControl(ClientPtr client)
for (dev = inputInfo.devices; dev; dev = dev->next) {
if ((dev == mouse || (!IsMaster(dev) && dev->u.master == mouse)) &&
- dev->ptrfeed && dev->ptrfeed->CtrlProc) {
+ dev->ptrfeed) {
dev->ptrfeed->ctrl = ctrl;
- (*dev->ptrfeed->CtrlProc)(dev, &mouse->ptrfeed->ctrl);
}
}
diff --git a/xorg-server/dix/dixfonts.c b/xorg-server/dix/dixfonts.c
index 3f4baf6cb..f1f53a13b 100644
--- a/xorg-server/dix/dixfonts.c
+++ b/xorg-server/dix/dixfonts.c
@@ -323,10 +323,10 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
continue;
}
if (err == Suspended) {
- if (!c->slept) {
- c->slept = TRUE;
- ClientSleep(client, (ClientSleepProcPtr)doOpenFont, (pointer) c);
- }
+ if (!ClientIsAsleep(client))
+ ClientSleep(client, (ClientSleepProcPtr)doOpenFont, c);
+ else
+ goto xinerama_sleep;
return TRUE;
}
break;
@@ -375,8 +375,8 @@ bail:
SendErrorToClient(c->client, X_OpenFont, 0,
c->fontid, FontToXError(err));
}
- if (c->slept)
- ClientWakeup(c->client);
+ ClientWakeup(c->client);
+xinerama_sleep:
for (i = 0; i < c->num_fpes; i++) {
FreeFPE(c->fpe_list[i]);
}
@@ -462,7 +462,6 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
c->current_fpe = 0;
c->num_fpes = num_fpes;
c->fnamelen = lenfname;
- c->slept = FALSE;
c->flags = flags;
c->non_cachable_font = cached;
@@ -624,12 +623,12 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
c->names);
if (err == Suspended) {
- if (!c->slept) {
- c->slept = TRUE;
+ if (!ClientIsAsleep(client))
ClientSleep(client,
- (ClientSleepProcPtr)doListFontsAndAliases,
- (pointer) c);
- }
+ (ClientSleepProcPtr)doListFontsAndAliases,
+ c);
+ else
+ goto xinerama_sleep;
return TRUE;
}
@@ -652,12 +651,12 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
c->current.patlen, c->current.max_names - c->names->nnames,
&c->current.private);
if (err == Suspended) {
- if (!c->slept) {
+ if (!ClientIsAsleep(client))
ClientSleep(client,
(ClientSleepProcPtr)doListFontsAndAliases,
- (pointer) c);
- c->slept = TRUE;
- }
+ c);
+ else
+ goto xinerama_sleep;
return TRUE;
}
if (err == Successful)
@@ -670,12 +669,12 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
((pointer) c->client, fpe, &name, &namelen, &tmpname,
&resolvedlen, c->current.private);
if (err == Suspended) {
- if (!c->slept) {
+ if (ClientIsAsleep(client))
ClientSleep(client,
(ClientSleepProcPtr)doListFontsAndAliases,
- (pointer) c);
- c->slept = TRUE;
- }
+ c);
+ else
+ goto xinerama_sleep;
return TRUE;
}
if (err == FontNameAlias) {
@@ -824,8 +823,8 @@ finish:
free(bufferStart);
bail:
- if (c->slept)
- ClientWakeup(client);
+ ClientWakeup(client);
+xinerama_sleep:
for (i = 0; i < c->num_fpes; i++)
FreeFPE(c->fpe_list[i]);
free(c->fpe_list);
@@ -883,7 +882,6 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length,
c->current.list_started = FALSE;
c->current.private = 0;
c->haveSaved = FALSE;
- c->slept = FALSE;
c->savedName = 0;
doListFontsAndAliases(client, c);
return Success;
@@ -930,11 +928,11 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
c->current.max_names, &c->current.private);
if (err == Suspended)
{
- if (!c->slept)
- {
- ClientSleep(client, (ClientSleepProcPtr)doListFontsWithInfo, c);
- c->slept = TRUE;
- }
+ if (!ClientIsAsleep(client))
+ ClientSleep(client,
+ (ClientSleepProcPtr)doListFontsWithInfo, c);
+ else
+ goto xinerama_sleep;
return TRUE;
}
if (err == Successful)
@@ -949,13 +947,11 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
&numFonts, c->current.private);
if (err == Suspended)
{
- if (!c->slept)
- {
+ if (!ClientIsAsleep(client))
ClientSleep(client,
- (ClientSleepProcPtr)doListFontsWithInfo,
- c);
- c->slept = TRUE;
- }
+ (ClientSleepProcPtr)doListFontsWithInfo, c);
+ else
+ goto xinerama_sleep;
return TRUE;
}
}
@@ -1100,8 +1096,8 @@ finish:
- sizeof(xGenericReply));
WriteSwappedDataToClient(client, length, &finalReply);
bail:
- if (c->slept)
- ClientWakeup(client);
+ ClientWakeup(client);
+xinerama_sleep:
for (i = 0; i < c->num_fpes; i++)
FreeFPE(c->fpe_list[i]);
free(c->reply);
@@ -1156,7 +1152,6 @@ StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern,
c->current.private = 0;
c->savedNumFonts = 0;
c->haveSaved = FALSE;
- c->slept = FALSE;
c->savedName = 0;
doListFontsWithInfo(client, c);
return Success;
@@ -1183,7 +1178,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
fpe = c->pGC->font->fpe;
(*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
- if (c->slept)
+ if (ClientIsAsleep(client))
{
/* Client has died, but we cannot bail out right now. We
need to clean up after the work we did when going to
@@ -1200,7 +1195,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
}
/* Make sure our drawable hasn't disappeared while we slept. */
- if (c->slept && c->pDraw)
+ if (ClientIsAsleep(client) && c->pDraw)
{
DrawablePtr pDraw;
dixLookupDrawable(&pDraw, c->did, client, 0, DixWriteAccess);
@@ -1214,7 +1209,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
}
}
- client_state = c->slept ? SLEEPING : NEVER_SLEPT;
+ client_state = ClientIsAsleep(client) ? SLEEPING : NEVER_SLEPT;
while (c->endReq - c->pElt > TextEltHeader)
{
@@ -1297,7 +1292,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
if (lgerr == Suspended)
{
- if (!c->slept) {
+ if (!ClientIsAsleep(client)) {
int len;
GC *pGC;
PTclosurePtr new_closure;
@@ -1370,15 +1365,14 @@ doPolyText(ClientPtr client, PTclosurePtr c)
c->pGC = pGC;
ValidateGC(c->pDraw, c->pGC);
- c->slept = TRUE;
- ClientSleep(client,
- (ClientSleepProcPtr)doPolyText,
- (pointer) c);
+ ClientSleep(client, (ClientSleepProcPtr)doPolyText, c);
/* Set up to perform steps 3 and 4 */
client_state = START_SLEEP;
continue; /* on to steps 3 and 4 */
}
+ else
+ goto xinerama_sleep;
return TRUE;
}
else if (lgerr != Successful)
@@ -1421,9 +1415,10 @@ bail:
#endif
SendErrorToClient(c->client, c->reqType, 0, 0, err);
}
- if (c->slept)
+ if (ClientIsAsleep(client))
{
ClientWakeup(c->client);
+xinerama_sleep:
ChangeGC(NullClient, c->pGC, clearGCmask, clearGC);
/* Unreference the font from the scratch GC */
@@ -1462,7 +1457,6 @@ PolyText(ClientPtr client, DrawablePtr pDraw, GC *pGC, unsigned char *pElt,
local_closure.pGC = pGC;
local_closure.did = did;
local_closure.err = Success;
- local_closure.slept = FALSE;
(void) doPolyText(client, &local_closure);
return Success;
@@ -1487,7 +1481,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
}
/* Make sure our drawable hasn't disappeared while we slept. */
- if (c->slept && c->pDraw)
+ if (ClientIsAsleep(client) && c->pDraw)
{
DrawablePtr pDraw;
dixLookupDrawable(&pDraw, c->did, client, 0, DixWriteAccess);
@@ -1504,7 +1498,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
lgerr = LoadGlyphs(client, c->pGC->font, c->nChars, c->itemSize, c->data);
if (lgerr == Suspended)
{
- if (!c->slept) {
+ if (!ClientIsAsleep(client)) {
GC *pGC;
unsigned char *data;
ITclosurePtr new_closure;
@@ -1557,9 +1551,10 @@ doImageText(ClientPtr client, ITclosurePtr c)
c->pGC = pGC;
ValidateGC(c->pDraw, c->pGC);
- c->slept = TRUE;
- ClientSleep(client, (ClientSleepProcPtr)doImageText, (pointer) c);
+ ClientSleep(client, (ClientSleepProcPtr)doImageText, c);
}
+ else
+ goto xinerama_sleep;
return TRUE;
}
else if (lgerr != Successful)
@@ -1578,9 +1573,10 @@ bail:
if (err != Success && c->client != serverClient) {
SendErrorToClient(c->client, c->reqType, 0, 0, err);
}
- if (c->slept)
+ if (ClientIsAsleep(client))
{
ClientWakeup(c->client);
+xinerama_sleep:
ChangeGC(NullClient, c->pGC, clearGCmask, clearGC);
/* Unreference the font from the scratch GC */
@@ -1618,7 +1614,6 @@ ImageText(ClientPtr client, DrawablePtr pDraw, GC *pGC, int nChars,
local_closure.itemSize = 2;
}
local_closure.did = did;
- local_closure.slept = FALSE;
(void) doImageText(client, &local_closure);
return Success;
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index 1a0319908..92e96b0bb 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -667,8 +667,8 @@ clipValuators(DeviceIntPtr pDev, int first_valuator, int num_valuators,
* events if a DCCE was generated.
* @return The updated @events pointer.
*/
-static EventListPtr
-updateFromMaster(EventListPtr events, DeviceIntPtr dev, int type, int *num_events)
+EventListPtr
+UpdateFromMaster(EventListPtr events, DeviceIntPtr dev, int type, int *num_events)
{
DeviceIntPtr master;
@@ -944,7 +944,7 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type,
num_events = 1;
- events = updateFromMaster(events, pDev, DEVCHANGE_KEYBOARD_EVENT, &num_events);
+ events = UpdateFromMaster(events, pDev, DEVCHANGE_KEYBOARD_EVENT, &num_events);
/* Handle core repeating, via press/release/press/release. */
if (type == KeyPress && key_is_down(pDev, key_code, KEY_POSTED)) {
@@ -1106,7 +1106,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
(type == MotionNotify && num_valuators <= 0))
return 0;
- events = updateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events);
+ events = UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events);
raw = (RawDeviceEvent*)events->event;
events++;
@@ -1221,7 +1221,7 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type,
(num_valuators + first_valuator) > pDev->valuator->numAxes)
return 0;
- events = updateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events);
+ events = UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events);
event = (DeviceEvent *) events->event;
init_event(pDev, event, GetTimeInMillis());
diff --git a/xorg-server/doc/xml/Xserver-spec.xml b/xorg-server/doc/xml/Xserver-spec.xml
index a457063bd..c8168f4f0 100644
--- a/xorg-server/doc/xml/Xserver-spec.xml
+++ b/xorg-server/doc/xml/Xserver-spec.xml
@@ -92,6 +92,13 @@
<authorinitials>efw</authorinitials>
<revremark>Revised for devPrivates changes</revremark>
</revision>
+ <revision>
+ <revnumber>3.5</revnumber>
+ <date>July 2010</date>
+ <authorinitials>ac</authorinitials>
+ <revremark>Revised for Xorg 1.9 devPrivates changes
+ and 1.8 CreateNewResourceType changes</revremark>
+ </revision>
</revhistory>
<legalnotice>
<para>Copyright &#xA9; 1994 X Consortium, Inc., 2004 X.org Foundation, Inc.</para>
@@ -3753,7 +3760,7 @@ Also included in each GC is support for dynamic devPrivates, which the
DDX can use for any purpose (see <xref linkend="wrappers_and_privates"/> below).</para>
<para>
The DIX routines available for manipulating GCs are
-CreateGC, ChangeGC, CopyGC, SetClipRects, SetDashes, and FreeGC.
+CreateGC, ChangeGC, ChangeGCXIDs, CopyGC, SetClipRects, SetDashes, and FreeGC.
<blockquote><programlisting>
GCPtr CreateGC(pDrawable, mask, pval, pStatus)
@@ -3762,10 +3769,17 @@ CreateGC, ChangeGC, CopyGC, SetClipRects, SetDashes, and FreeGC.
XID *pval;
int *pStatus;
- int ChangeGC(pGC, mask, pval)
+ int ChangeGC(client, pGC, mask, pUnion)
+ ClientPtr client;
GCPtr pGC;
BITS32 mask;
- XID *pval;
+ ChangeGCValPtr pUnion;
+
+ int ChangeGCXIDs(client, pGC, mask, pC32)
+ ClientPtr client;
+ GCPtr pGC;
+ BITS32 mask;
+ CARD32 *pC32;
int CopyGC(pgcSrc, pgcDst, mask)
GCPtr pgcSrc;
@@ -4808,32 +4822,68 @@ Two new extensibility concepts have been developed for release 4, Wrappers
and devPrivates. These replace the R3 GCInterest queues, which were not a
general enough mechanism for many extensions and only provided hooks into a
single data structure. devPrivates have been revised substantially for
-X.org X server relase 1.5.</para>
+X.Org X server release 1.5, and updated again for the 1.9 release.</para>
<section>
<title>devPrivates</title>
<para>
devPrivates provides a way to attach arbitrary private data to various server structures.
Any structure which contains a <structfield>devPrivates</structfield> field of
-type <type>PrivateRec</type> supports this mechanism. Private data can be allocated at
-any time during an object's life cycle and callbacks are available to initialize and clean
-up allocated space.</para>
+type <type>PrivateRec</type> supports this mechanism. Some structures allow
+allocating space for private data after some objects have been created, others
+require all space allocations be registered before any objects of that type
+are created. <filename class="headerfile">Xserver/include/privates.h</filename>
+lists which of these cases applies to each structure containing
+<structfield>devPrivates</structfield>.</para>
+
+<para>
+To request private space, use
+<blockquote><programlisting>
+ Bool dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size);
+</programlisting></blockquote>
+The first argument is a pointer to a <type>DevPrivateKeyRec</type> which
+will serve as the unique identifier for the private data. Typically this is
+the address of a static <type>DevPrivateKeyRec</type> in your code.
+The second argument is the class of objects for which this key will apply.
+The third argument is the size of the space being requested, or
+<constant>0</constant> to only allocate a pointer that the caller will manage.
+If space is requested, this space will be automatically freed when the object
+is destroyed. Note that a call to <function>dixSetPrivate</function>
+that changes the pointer value may cause the space to be unreachable by the caller, however it will still be automatically freed.
+The function returns <literal>TRUE</literal> unless memory allocation fails.
+If the function is called more than once on the same key, all calls must use
+the same value for <type>size</type> or the server will abort.</para>
+
+<para>
+To request private space and have the server manage the key, use
+<blockquote><programlisting>
+ DevPrivateKey dixCreatePrivateKey(DevPrivateType type, unsigned size);
+</programlisting></blockquote>
+The <parameter>type</parameter> and <parameter>size</parameter> arguments are
+the same as those to <function>dixRegisterPrivateKey</function> but this
+function allocates a <type>DevPrivateKeyRec</type> and returns a pointer to it
+instead of requiring the caller to pass a pointer to an existing structure.
+The server will free it automatically when the privates system is restarted
+at server reset time.</para>
+
<para>
To attach a piece of private data to an object, use:
<blockquote><programlisting>
- int dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val)
+ void dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val)
</programlisting></blockquote>
-The first argument is the address of the <structfield>devPrivates</structfield> field
-in the target structure. This field is managed privately by the DIX layer and
-should not be directly modified. The second argument is some address value which
-will serve as the unique identifier for the private data. Typically this is the address
-of some global variable in your code. Only one piece of data with a given key can be attached to an object. However, you
-can use the same key to store data in any object that supports the devPrivates mechanism. The third
-argument is the value to store.</para>
+The first argument is the address of the <structfield>devPrivates</structfield>
+field in the target structure. This field is managed privately by the DIX
+layer and should not be directly modified. The second argument is a pointer
+to the <type>DevPrivateKeyRec</type> which you registered with
+<function>dixRegisterPrivateKey</function> or allocated with
+<function>dixCreatePrivateKey</function>. Only one
+piece of data with a given key can be attached to an object, and in most cases
+each key is specific to the type of object it was registered for. (An
+exception is the PRIVATE_XSELINUX class which applies to multiple object types.)
+The third argument is the value to store.</para>
<para>
-If private data with the given key is already associated with the object, <function>dixSetPrivate</function> will
-overwrite the old value with the new one. Otherwise, new space will be allocated to hold the pointer value.
-The function returns <literal>TRUE</literal> unless memory allocation fails, but note that since memory allocation only
-occurs on the first reference to the private data, all subsequent calls are guaranteed to succeed.</para>
+If private data with the given key is already associated with the object,
+<function>dixSetPrivate</function> will overwrite the old value with the
+new one.</para>
<para>
To look up a piece of private data, use one of:
@@ -4842,56 +4892,22 @@ To look up a piece of private data, use one of:
pointer *dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key)
</programlisting></blockquote>
The first argument is the address of the <structfield>devPrivates</structfield> field
-in the target structure. The second argument is the key to look up. If private data with the given key is already associated
-with the object, <function>dixLookupPrivate</function> will return the stored pointer value while <function>dixLookupPrivateAddr</function>
-will return the address of the stored pointer. Otherwise, new space will be first allocated to hold the pointer value
-and it will be initialized to NULL. Both functions return <literal>NULL</literal> if memory allocation fails, but note that
-since memory allocation only occurs on the first reference to the private data, all subsequent calls are guaranteed to succeed.</para>
-
-<para>
-To request pre-allocated private space, use
-<blockquote><programlisting>
- int dixRequestPrivate(const DevPrivateKey key, unsigned size)
-</programlisting></blockquote>
-The first argument is the key for which space is being requested. The second argument is the size of the space being requested.
-After this function has been called,
-future calls to <function>dixLookupPrivate</function> or <function>dixLookupPrivateAddr</function> that cause the private pointer
-to be initially allocated will also allocate <varname>size</varname> bytes of space cleared to zero and initialize the private pointer to point
-to this space instead of <literal>NULL</literal>. This space will be automatically freed. Note that a call to <function>dixSetPrivate</function>
-that changes the pointer value may cause the space to be unreachable by the caller, however it will still be automatically freed.
-The function returns <literal>TRUE</literal> unless memory allocation fails. If the function is called more than once, the largest value
-of <type>size</type> is used.</para>
-
-<para>
-To set callbacks for initializing and cleaning up private space, use
-<blockquote><programlisting>
- typedef struct {
- DevPrivateKey key;
- pointer *value;
- } PrivateCallbackRec;
-
- int dixRegisterPrivateInitFunc(const DevPrivateKey key,
- CallbackProcPtr callback,
- pointer userdata)
- int dixRegisterPrivateDeleteFunc(const DevPrivateKey key,
- CallbackProcPtr callback,
- pointer userdata)
-</programlisting></blockquote>
-The first argument is the key for which the callbacks are being registered. The second argument is the callback function. The third argument
-will be passed as the user data argument to the callback function when it is called. The call data argument to the callback is a pointer to
-a structure of type <type>PrivateCallbackRec</type>.</para>
-<para>
-The init callback is called immediately after new private space has been allocated for the given key. The delete callback is called immediately
-before the private space is freed when the object is being destroyed. The <type>PrivateCallbackRec</type> structure contains the devPrivate key
-and the address of the private pointer. The init callback may be used to initialize any pre-allocated space requested by
-<function>dixRequestPrivate</function>, while the delete callback may be used to free any data stored there. However the callbacks are called even
-if no pre-allocated space was requested.</para>
-
-<para>
-When implementing new server resource objects that support devPrivates, there are three steps to perform:
-Declare a field of type <type>PrivateRec *</type> in your structure;
+in the target structure. The second argument is the key to look up.
+If a non-zero size was given when the key was registered, or if private data
+with the given key is already associated with the object, then
+<function>dixLookupPrivate</function> will return the pointer value
+while <function>dixLookupPrivateAddr</function>
+will return the address of the pointer.</para>
+
+<para>
+When implementing new server resource objects that support devPrivates, there
+are four steps to perform:
+Add a type value to the <type>DevPrivateType</type> enum in
+<filename class="headerfile">Xserver/include/privates.h</filename>,
+declare a field of type <type>PrivateRec *</type> in your structure;
initialize this field to <literal>NULL</literal> when creating any objects; and
-call the <function>dixFreePrivates</function> function, passing in the field value, when freeing any objects.</para>
+when freeing any objects call the <function>dixFreePrivates</function> or
+<function>dixFreeObjectWithPrivates</function> function.</para>
</section>
<section>
<title>Wrappers</title>
diff --git a/xorg-server/doc/xml/xmlrules.in b/xorg-server/doc/xml/xmlrules.in
index 667cc2ebb..1222bb5af 100644
--- a/xorg-server/doc/xml/xmlrules.in
+++ b/xorg-server/doc/xml/xmlrules.in
@@ -48,10 +48,12 @@ xorg.css: $(STYLESHEET_SRCDIR)/xorg.css
endif
if HAVE_XMLTO
+if HAVE_XMLTO_TEXT
BUILT_DOC_FILES += $(TXT_FILES)
.xml.txt:
@rm -f $@
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
+endif
BUILT_DOC_FILES += $(HTML_FILES)
.xml.html:
diff --git a/xorg-server/fb/fbpict.c b/xorg-server/fb/fbpict.c
index d6dc30d2c..9e2c35c4b 100644
--- a/xorg-server/fb/fbpict.c
+++ b/xorg-server/fb/fbpict.c
@@ -332,8 +332,11 @@ create_bits_picture (PicturePtr pict,
return image;
}
+static pixman_image_t *
+image_from_pict_internal (PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map);
+
static void
-set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
+set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map)
{
pixman_repeat_t repeat;
pixman_filter_t filter;
@@ -382,10 +385,13 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
pixman_image_set_repeat (image, repeat);
- if (pict->alphaMap)
+ /* Fetch alpha map unless 'pict' is being used
+ * as the alpha map for this operation
+ */
+ if (pict->alphaMap && !is_alpha_map)
{
int alpha_xoff, alpha_yoff;
- pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff);
+ pixman_image_t *alpha_map = image_from_pict_internal (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff, TRUE);
pixman_image_set_alpha_map (
image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y);
@@ -417,8 +423,8 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
pixman_image_set_source_clipping (image, TRUE);
}
-pixman_image_t *
-image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
+static pixman_image_t *
+image_from_pict_internal (PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map)
{
pixman_image_t *image = NULL;
@@ -452,11 +458,17 @@ image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
}
if (image)
- set_image_properties (image, pict, has_clip, xoff, yoff);
+ set_image_properties (image, pict, has_clip, xoff, yoff, is_alpha_map);
return image;
}
+pixman_image_t *
+image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
+{
+ return image_from_pict_internal (pict, has_clip, xoff, yoff, FALSE);
+}
+
void
free_pixman_pict (PicturePtr pict, pixman_image_t *image)
{
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c
index 845bde87a..8ea50aa94 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.c
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.c
@@ -264,9 +264,6 @@ ApplyAccelerationSettings(DeviceIntPtr dev){
if (i >= 0)
dev->ptrfeed->ctrl.threshold = i;
- /* mostly a no-op anyway */
- (*dev->ptrfeed->CtrlProc)(dev, &dev->ptrfeed->ctrl);
-
xf86Msg(X_CONFIG, "%s: (accel) acceleration factor: %.3f\n",
local->name, ((float)dev->ptrfeed->ctrl.num)/
((float)dev->ptrfeed->ctrl.den));
diff --git a/xorg-server/hw/xfree86/parser/Input.c b/xorg-server/hw/xfree86/parser/Input.c
index 8adbee9ae..739e49ba4 100644
--- a/xorg-server/hw/xfree86/parser/Input.c
+++ b/xorg-server/hw/xfree86/parser/Input.c
@@ -59,6 +59,7 @@
#include <xorg-config.h>
#endif
+#include "os.h"
#include "xf86Parser.h"
#include "xf86tokens.h"
#include "Configint.h"
@@ -102,8 +103,10 @@ xf86parseInputSection (void)
case DRIVER:
if (xf86getSubToken (&(ptr->inp_comment)) != STRING)
Error (QUOTE_MSG, "Driver");
- if (strcmp(val.str, "keyboard") == 0)
- ptr->inp_driver = "kbd";
+ if (strcmp(val.str, "keyboard") == 0) {
+ ptr->inp_driver = strdup("kbd");
+ free(val.str);
+ }
else
ptr->inp_driver = val.str;
break;
diff --git a/xorg-server/hw/xfree86/parser/InputClass.c b/xorg-server/hw/xfree86/parser/InputClass.c
index 85161c38a..ddf344a0f 100644
--- a/xorg-server/hw/xfree86/parser/InputClass.c
+++ b/xorg-server/hw/xfree86/parser/InputClass.c
@@ -111,8 +111,10 @@ xf86parseInputClassSection(void)
case DRIVER:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "Driver");
- if (strcmp(val.str, "keyboard") == 0)
- ptr->driver = "kbd";
+ if (strcmp(val.str, "keyboard") == 0) {
+ ptr->driver = strdup("kbd");
+ free(val.str);
+ }
else
ptr->driver = val.str;
break;
diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c
index bc0d24841..e156be83c 100644
--- a/xorg-server/hw/xwin/glx/indirect.c
+++ b/xorg-server/hw/xwin/glx/indirect.c
@@ -1109,7 +1109,7 @@ glxWinSetPixelFormat(__GLXWinContext *gc, HDC hdc, int bppOverride, int drawable
__GLXconfig *config = gc->base.config;
GLXWinConfig *winConfig = (GLXWinConfig *)config;
-
+
GLWIN_DEBUG_MSG("glxWinSetPixelFormat: pixelFormatIndex %d", winConfig->pixelFormatIndex);
/*
@@ -1153,7 +1153,7 @@ glxWinSetPixelFormat(__GLXWinContext *gc, HDC hdc, int bppOverride, int drawable
{
PIXELFORMATDESCRIPTOR pfd;
int pixelFormat;
-
+
/* convert fbConfig to PFD */
if (fbConfigToPixelFormat(gc->base.config, &pfd, drawableTypeOverride))
{
diff --git a/xorg-server/include/closestr.h b/xorg-server/include/closestr.h
index 2cd67b1d3..a64798608 100644
--- a/xorg-server/include/closestr.h
+++ b/xorg-server/include/closestr.h
@@ -1,156 +1,151 @@
-/*
-
-Copyright 1991, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-
-#ifndef CLOSESTR_H
-#define CLOSESTR_H
-
-#include <X11/Xproto.h>
-#include "closure.h"
-#include "dix.h"
-#include "misc.h"
-#include "gcstruct.h"
-
-/* closure structures */
-
-/* OpenFont */
-
-typedef struct _OFclosure {
- ClientPtr client;
- short current_fpe;
- short num_fpes;
- FontPathElementPtr *fpe_list;
- Mask flags;
- Bool slept;
-
-/* XXX -- get these from request buffer instead? */
- char *origFontName;
- int origFontNameLen;
- XID fontid;
- char *fontname;
- int fnamelen;
- FontPtr non_cachable_font;
-} OFclosureRec;
-
-/* ListFontsWithInfo */
-
-#define XLFDMAXFONTNAMELEN 256
-typedef struct _LFWIstate {
- char pattern[XLFDMAXFONTNAMELEN];
- int patlen;
- int current_fpe;
- int max_names;
- Bool list_started;
- pointer private;
-} LFWIstateRec, *LFWIstatePtr;
-
-typedef struct _LFWIclosure {
- ClientPtr client;
- int num_fpes;
- FontPathElementPtr *fpe_list;
- xListFontsWithInfoReply *reply;
- int length;
- LFWIstateRec current;
- LFWIstateRec saved;
- int savedNumFonts;
- Bool haveSaved;
- Bool slept;
- char *savedName;
-} LFWIclosureRec;
-
-/* ListFonts */
-
-typedef struct _LFclosure {
- ClientPtr client;
- int num_fpes;
- FontPathElementPtr *fpe_list;
- FontNamesPtr names;
- LFWIstateRec current;
- LFWIstateRec saved;
- Bool haveSaved;
- Bool slept;
- char *savedName;
- int savedNameLen;
-} LFclosureRec;
-
-/* PolyText */
-
-typedef
- int (* PolyTextPtr)(
- DrawablePtr /* pDraw */,
- GCPtr /* pGC */,
- int /* x */,
- int /* y */,
- int /* count */,
- void * /* chars or shorts */
- );
-
-typedef struct _PTclosure {
- ClientPtr client;
- DrawablePtr pDraw;
- GC *pGC;
- unsigned char *pElt;
- unsigned char *endReq;
- unsigned char *data;
- int xorg;
- int yorg;
- CARD8 reqType;
- PolyTextPtr polyText;
- int itemSize;
- XID did;
- int err;
- Bool slept;
-} PTclosureRec;
-
-/* ImageText */
-
-typedef
- void (* ImageTextPtr)(
- DrawablePtr /* pDraw */,
- GCPtr /* pGC */,
- int /* x */,
- int /* y */,
- int /* count */,
- void * /* chars or shorts */
- );
-
-typedef struct _ITclosure {
- ClientPtr client;
- DrawablePtr pDraw;
- GC *pGC;
- BYTE nChars;
- unsigned char *data;
- int xorg;
- int yorg;
- CARD8 reqType;
- ImageTextPtr imageText;
- int itemSize;
- XID did;
- Bool slept;
-} ITclosureRec;
-#endif /* CLOSESTR_H */
+/*
+
+Copyright 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+
+#ifndef CLOSESTR_H
+#define CLOSESTR_H
+
+#include <X11/Xproto.h>
+#include "closure.h"
+#include "dix.h"
+#include "misc.h"
+#include "gcstruct.h"
+
+/* closure structures */
+
+/* OpenFont */
+
+typedef struct _OFclosure {
+ ClientPtr client;
+ short current_fpe;
+ short num_fpes;
+ FontPathElementPtr *fpe_list;
+ Mask flags;
+
+/* XXX -- get these from request buffer instead? */
+ char *origFontName;
+ int origFontNameLen;
+ XID fontid;
+ char *fontname;
+ int fnamelen;
+ FontPtr non_cachable_font;
+} OFclosureRec;
+
+/* ListFontsWithInfo */
+
+#define XLFDMAXFONTNAMELEN 256
+typedef struct _LFWIstate {
+ char pattern[XLFDMAXFONTNAMELEN];
+ int patlen;
+ int current_fpe;
+ int max_names;
+ Bool list_started;
+ pointer private;
+} LFWIstateRec, *LFWIstatePtr;
+
+typedef struct _LFWIclosure {
+ ClientPtr client;
+ int num_fpes;
+ FontPathElementPtr *fpe_list;
+ xListFontsWithInfoReply *reply;
+ int length;
+ LFWIstateRec current;
+ LFWIstateRec saved;
+ int savedNumFonts;
+ Bool haveSaved;
+ char *savedName;
+} LFWIclosureRec;
+
+/* ListFonts */
+
+typedef struct _LFclosure {
+ ClientPtr client;
+ int num_fpes;
+ FontPathElementPtr *fpe_list;
+ FontNamesPtr names;
+ LFWIstateRec current;
+ LFWIstateRec saved;
+ Bool haveSaved;
+ char *savedName;
+ int savedNameLen;
+} LFclosureRec;
+
+/* PolyText */
+
+typedef
+ int (* PolyTextPtr)(
+ DrawablePtr /* pDraw */,
+ GCPtr /* pGC */,
+ int /* x */,
+ int /* y */,
+ int /* count */,
+ void * /* chars or shorts */
+ );
+
+typedef struct _PTclosure {
+ ClientPtr client;
+ DrawablePtr pDraw;
+ GC *pGC;
+ unsigned char *pElt;
+ unsigned char *endReq;
+ unsigned char *data;
+ int xorg;
+ int yorg;
+ CARD8 reqType;
+ PolyTextPtr polyText;
+ int itemSize;
+ XID did;
+ int err;
+} PTclosureRec;
+
+/* ImageText */
+
+typedef
+ void (* ImageTextPtr)(
+ DrawablePtr /* pDraw */,
+ GCPtr /* pGC */,
+ int /* x */,
+ int /* y */,
+ int /* count */,
+ void * /* chars or shorts */
+ );
+
+typedef struct _ITclosure {
+ ClientPtr client;
+ DrawablePtr pDraw;
+ GC *pGC;
+ BYTE nChars;
+ unsigned char *data;
+ int xorg;
+ int yorg;
+ CARD8 reqType;
+ ImageTextPtr imageText;
+ int itemSize;
+ XID did;
+} ITclosureRec;
+#endif /* CLOSESTR_H */
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h
index 33b94fd3e..1930a308b 100644
--- a/xorg-server/include/input.h
+++ b/xorg-server/include/input.h
@@ -439,6 +439,12 @@ extern void CreateClassesChangedEvent(EventListPtr event,
DeviceIntPtr master,
DeviceIntPtr slave,
int type);
+extern EventListPtr UpdateFromMaster(
+ EventListPtr events,
+ DeviceIntPtr pDev,
+ int type,
+ int *num_events);
+
extern _X_EXPORT int GetPointerEvents(
EventListPtr events,
DeviceIntPtr pDev,
diff --git a/xorg-server/include/privates.h b/xorg-server/include/privates.h
index 9b578e467..c2b7b43ec 100644
--- a/xorg-server/include/privates.h
+++ b/xorg-server/include/privates.h
@@ -81,10 +81,10 @@ typedef struct _DevPrivateKeyRec {
* you can get the address of the extra space and store whatever data you like
* there.
*
- * You may call dixRegisterPrivate more than once on the same key, but the
+ * You may call dixRegisterPrivateKey more than once on the same key, but the
* size and type must match or the server will abort.
*
- * dixRegisterPrivateIndex returns FALSE if it fails to allocate memory
+ * dixRegisterPrivateKey returns FALSE if it fails to allocate memory
* during its operation.
*/
extern _X_EXPORT Bool
diff --git a/xorg-server/miext/rootless/rootlessCommon.c b/xorg-server/miext/rootless/rootlessCommon.c
index e97a53725..4f059801b 100644
--- a/xorg-server/miext/rootless/rootlessCommon.c
+++ b/xorg-server/miext/rootless/rootlessCommon.c
@@ -92,6 +92,9 @@ IsFramedWindow(WindowPtr pWin)
{
WindowPtr top;
+ if (!dixPrivateKeyRegistered(&rootlessWindowPrivateKeyRec))
+ return FALSE;
+
if (!pWin->realized)
return FALSE;
top = TopLevelParent(pWin);
diff --git a/xorg-server/xkb/xkbActions.c b/xorg-server/xkb/xkbActions.c
index 294a2db9a..b9614b7aa 100644
--- a/xorg-server/xkb/xkbActions.c
+++ b/xorg-server/xkb/xkbActions.c
@@ -1332,36 +1332,53 @@ xkbStateNotify sn;
return;
}
+/*
+ * The event is injected into the event processing, not the EQ. Thus,
+ * ensure that we restore the master after the event sequence to the
+ * original set of classes. Otherwise, the master remains on the XTEST
+ * classes and drops events that don't fit into the XTEST layout (e.g.
+ * events with more than 2 valuators).
+ *
+ * FIXME: EQ injection in the processing stage is not designed for, so this
+ * is a rather awkward hack. The event list returned by GetPointerEvents()
+ * and friends is always prefixed with a DCE if the last _posted_ device was
+ * different. For normal events, this sequence then resets the master during
+ * the processing stage. Since we inject the PointerKey events in the
+ * processing stage though, we need to manually reset to restore the
+ * previous order, because the events already in the EQ must be sent for the
+ * right device.
+ * So we post-fix the event list we get from GPE with a DCE back to the
+ * previous slave device.
+ *
+ * First one on drinking island wins!
+ */
static void
-XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y)
+InjectPointerKeyEvents(DeviceIntPtr dev, int type, int button, int flags, int num_valuators, int *valuators)
{
+ ScreenPtr pScreen;
EventListPtr events;
int nevents, i;
- DeviceIntPtr ptr;
- ScreenPtr pScreen;
+ DeviceIntPtr ptr, mpointer, lastSlave = NULL;
Bool saveWait;
- int gpe_flags = 0;
- int Point[]={x, y};
- if (IsMaster(dev))
- ptr = GetXTestDevice(GetMaster(dev, MASTER_POINTER));
- else if (!dev->u.master)
+ if (IsMaster(dev)) {
+ mpointer = GetMaster(dev, MASTER_POINTER);
+ lastSlave = mpointer->u.lastSlave;
+ ptr = GetXTestDevice(mpointer);
+ } else if (!dev->u.master)
ptr = dev;
else
return;
- if (flags & XkbSA_MoveAbsoluteX || flags & XkbSA_MoveAbsoluteY)
- gpe_flags = POINTER_ABSOLUTE;
- else
- gpe_flags = POINTER_RELATIVE;
- events = InitEventList(GetMaximumEventsNum());
+ events = InitEventList(GetMaximumEventsNum() + 1);
OsBlockSignals();
pScreen = miPointerGetScreen(ptr);
saveWait = miPointerSetWaitForUpdate(pScreen, FALSE);
- nevents = GetPointerEvents(events, ptr,
- MotionNotify, 0,
- gpe_flags, 0, 2, Point);
+ nevents = GetPointerEvents(events, ptr, type, button, flags, 0,
+ num_valuators, valuators);
+ if (IsMaster(dev) && (lastSlave && lastSlave != ptr))
+ UpdateFromMaster(&events[nevents], lastSlave, DEVCHANGE_POINTER_EVENT, &nevents);
miPointerSetWaitForUpdate(pScreen, saveWait);
OsReleaseSignals();
@@ -1369,14 +1386,32 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y)
mieqProcessDeviceEvent(ptr, (InternalEvent*)events[i].event, NULL);
FreeEventList(events, GetMaximumEventsNum());
+
+}
+
+static void
+XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y)
+{
+ int gpe_flags = 0;
+ int Point[]={x, y};
+
+ /* ignore attached SDs */
+ if (!IsMaster(dev) && GetMaster(dev, MASTER_POINTER) != NULL)
+ return;
+
+ if (flags & XkbSA_MoveAbsoluteX || flags & XkbSA_MoveAbsoluteY)
+ gpe_flags = POINTER_ABSOLUTE;
+ else
+ gpe_flags = POINTER_RELATIVE;
+
+ InjectPointerKeyEvents(dev, MotionNotify, 0, gpe_flags, 2, Point);
}
void
XkbFakeDeviceButton(DeviceIntPtr dev,Bool press,int button)
{
- EventListPtr events;
- int nevents, i;
DeviceIntPtr ptr;
+ int down;
/* If dev is a slave device, and the SD is attached, do nothing. If we'd
* post through the attached master pointer we'd get duplicate events.
@@ -1386,24 +1421,18 @@ XkbFakeDeviceButton(DeviceIntPtr dev,Bool press,int button)
* if dev is a floating slave, post through the device itself.
*/
- if (IsMaster(dev))
- ptr = GetXTestDevice(GetMaster(dev, MASTER_POINTER));
- else if (!dev->u.master)
+ if (IsMaster(dev)) {
+ DeviceIntPtr mpointer = GetMaster(dev, MASTER_POINTER);
+ ptr = GetXTestDevice(mpointer);
+ } else if (!dev->u.master)
ptr = dev;
else
return;
- events = InitEventList(GetMaximumEventsNum());
- OsBlockSignals();
- nevents = GetPointerEvents(events, ptr,
- press ? ButtonPress : ButtonRelease, button,
- 0 /* flags */, 0 /* first */,
- 0 /* num_val */, NULL);
- OsReleaseSignals();
-
-
- for (i = 0; i < nevents; i++)
- mieqProcessDeviceEvent(ptr, (InternalEvent*)events[i].event, NULL);
+ down = button_is_down(ptr, button, BUTTON_PROCESSED);
+ if (press == down)
+ return;
- FreeEventList(events, GetMaximumEventsNum());
+ InjectPointerKeyEvents(dev, press ? ButtonPress : ButtonRelease,
+ button, 0, 0, NULL);
}
diff --git a/xorg-server/xkeyboard-config/rules/base.extras.xml.in b/xorg-server/xkeyboard-config/rules/base.extras.xml.in
index a17205e54..ca4d42c49 100644
--- a/xorg-server/xkeyboard-config/rules/base.extras.xml.in
+++ b/xorg-server/xkeyboard-config/rules/base.extras.xml.in
@@ -81,6 +81,22 @@
</variant>
</variantList>
</layout>
+ <layout>
+ <configItem>
+ <name>ru</name>
+ <shortDescription>Rus</shortDescription>
+ <description>Russia</description>
+ </configItem>
+ <variantList>
+ <variant>
+ <configItem>
+ <name>chu</name>
+ <description>Church Slavonic</description>
+ <languageList><iso639Id>chu</iso639Id></languageList>
+ </configItem>
+ </variant>
+ </variantList>
+ </layout>
</layoutList>
<optionList/>
</xkbConfigRegistry>
diff --git a/xorg-server/xkeyboard-config/rules/extras/variantsMapping.lst b/xorg-server/xkeyboard-config/rules/extras/variantsMapping.lst
index 36af488d1..fd0add719 100644
--- a/xorg-server/xkeyboard-config/rules/extras/variantsMapping.lst
+++ b/xorg-server/xkeyboard-config/rules/extras/variantsMapping.lst
@@ -1,4 +1,5 @@
rs combiningkeys extras/rs combiningkeys
+ru chu extras/ru chu
ir ave extras/ir ave
us alt-intl-unicode extras/us alt-intl-unicode
us crd extras/us crd
diff --git a/xorg-server/xkeyboard-config/symbols/extras/Makefile.am b/xorg-server/xkeyboard-config/symbols/extras/Makefile.am
index 7410ac24f..948060441 100644
--- a/xorg-server/xkeyboard-config/symbols/extras/Makefile.am
+++ b/xorg-server/xkeyboard-config/symbols/extras/Makefile.am
@@ -1,5 +1,5 @@
symbolsdir = $(xkb_base)/symbols/extras
dist_symbols_DATA = apl \
ir \
- rs \
+ rs ru \
us
diff --git a/xorg-server/xkeyboard-config/symbols/extras/makefile b/xorg-server/xkeyboard-config/symbols/extras/makefile
index 99b45229c..0b9fa52aa 100644
--- a/xorg-server/xkeyboard-config/symbols/extras/makefile
+++ b/xorg-server/xkeyboard-config/symbols/extras/makefile
@@ -6,7 +6,7 @@ DESTDIR=$(MHMAKECONF)\xorg-server\xkbdata\symbols\extras
dist_symbols_DATA = apl \
ir \
- rs \
+ rs ru \
us
DATA_FILES=$(dist_symbols_DATA:%=$(DESTDIR)\%)
diff --git a/xorg-server/xkeyboard-config/symbols/extras/ru b/xorg-server/xkeyboard-config/symbols/extras/ru
new file mode 100644
index 000000000..7e2404250
--- /dev/null
+++ b/xorg-server/xkeyboard-config/symbols/extras/ru
@@ -0,0 +1,59 @@
+// Church Slavonic language layout
+// based on
+// russian standard keyboard
+// Aleksandr Andreev and Yuri Shardt
+// Last Changes 2010/08/01. Contact <aleksandr.andreev@gmail.com>
+
+partial alphanumeric_keys
+xkb_symbols "chu"
+{
+ name[Group1]= "Russia - Church Slavonic";
+ key <TLDE> { [ U0457, U0407, U0482, U20DD ] }; // ї Ї ҂ e.g: а⃝ where the last is a combining ten thousands sign
+ key <AE01> { [ U0461, U0460, U047D, U047C] }; // ѡ Ѡ ѽ Ѽ
+ key <AE02> { [ U0454, U0404, U0465, U0464] }; // є Є ѥ Ѥ
+ key <AE03> { [ U046F, U046E, U0469, U0468] }; // ѯ Ѯ ѩ Ѩ
+ key <AE04> { [ U0471, U0470, U046D, U046C] }; // ѱ Ѱ ѭ Ѭ
+ key <AE05> { [ U0473, U0472, Cyrillic_ya, Cyrillic_YA] }; // ѳ Ѳ я Я (WHERE Я IS I+A, NOT SMALL YUS)
+ key <AE06> { [ U0475, U0474, U0477, U0476] }; // ѵ Ѵ ѷ Ѷ
+ key <AE07> { [ U047B, U047A, UA64D, UA64C] }; // ѻ Ѻ ꙍ Ꙍ
+ key <AE08> { [ U047F, U047E, U046B, U046A] }; // ѿ Ѿ ѫ Ѫ
+ key <AE09> { [ U0455, U0405, parenleft, U002A ] }; // ѕ Ѕ ( *
+ key <AE10> { [ Cyrillic_u, Cyrillic_U, parenright, U0488 ] }; // у У ) NB: for diagraph Ouk, use Cyrillic_o + Cyrillic_u
+ key <AE11> { [ U0483, U0486, U0487, U005F] }; // а҃ а҆ а҇, _ (titlo, psili, pokrytie, underscore)
+ key <AE12> { [ U0301, U0300, U0484, UA67E] }; // а̀ а́ а҄ ꙾ (oxia, varia, kamora, kavyka)
+ key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI, U0456 ] };
+ key <AD02> { [ Cyrillic_tse, Cyrillic_TSE, U2DF0 ] };
+ key <AD03> { [ UA64B, UA64A, U2DF9 ] }; // Cyrillic monograph Uk (not U)!
+ key <AD04> { [ Cyrillic_ka, Cyrillic_KA, U2DE6 ] };
+ key <AD05> { [ Cyrillic_ie, Cyrillic_IE, U2DF7 ] };
+ key <AD06> { [ Cyrillic_en, Cyrillic_EN, U2DE9 ] };
+ key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE, U2DE2 ] };
+ key <AD08> { [ Cyrillic_sha, Cyrillic_SHA, U2DF2 ] };
+ key <AD09> { [ Cyrillic_shcha, Cyrillic_SHCHA, U2DF3 ] };
+ key <AD10> { [ Cyrillic_ze, Cyrillic_ZE, U2DE5 ] };
+ key <AD11> { [ Cyrillic_ha, Cyrillic_HA, U2DEF ] };
+ key <AD12> { [Cyrillic_hardsign,Cyrillic_HARDSIGN, UA67D ] }; // Payerok
+ key <BKSL> { [backslash, slash, colon, question] }; // \ / : ? (note, for Slavonic question use semicolon
+ key <AC01> { [ Cyrillic_ef, Cyrillic_EF ] };
+ key <AC02> { [ Cyrillic_yeru, Cyrillic_YERU ] };
+ key <AC03> { [ Cyrillic_ve, Cyrillic_VE, U2DE1 ] };
+ key <AC04> { [ Cyrillic_a, Cyrillic_A, U2DF6 ] };
+ key <AC05> { [ Cyrillic_pe, Cyrillic_PE, U2DEB ] };
+ key <AC06> { [ Cyrillic_er, Cyrillic_ER, U2DEC ] };
+ key <AC07> { [ Cyrillic_o, Cyrillic_O, U2DEA ] };
+ key <AC08> { [ Cyrillic_el, Cyrillic_EL, U2DE7 ] };
+ key <AC09> { [ Cyrillic_de, Cyrillic_DE, U2DE3 ] };
+ key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE, U2DE4 ] };
+ key <AC11> { [ U0463, U0462, U2DFA ] }; // Yat
+ key <AB01> { [ U0467, U0466, U2DFD ] }; // Small Yus
+ key <AB02> { [ Cyrillic_che, Cyrillic_CHE, U2DF1 ] };
+ key <AB03> { [ Cyrillic_es, Cyrillic_ES, U2DED ] };
+ key <AB04> { [ Cyrillic_em, Cyrillic_EM, U2DE8 ] };
+ key <AB05> { [ Cyrillic_i, Cyrillic_I ] };
+ key <AB06> { [ Cyrillic_te, Cyrillic_TE, U2DEE ] };
+ key <AB07> { [Cyrillic_softsign,Cyrillic_SOFTSIGN ] };
+ key <AB08> { [ Cyrillic_be, Cyrillic_BE, U2DE0 ] };
+ key <AB09> { [ Cyrillic_yu, Cyrillic_YU, U2DFB ] };
+ key <AB10> { [ period, comma, semicolon, exclam ] };
+};
+
diff --git a/xorg-server/xkeyboard-config/symbols/inet b/xorg-server/xkeyboard-config/symbols/inet
index 0fd549f76..b3b155bca 100644
--- a/xorg-server/xkeyboard-config/symbols/inet
+++ b/xorg-server/xkeyboard-config/symbols/inet
@@ -216,7 +216,10 @@ xkb_symbols "evdev" {
key <FK13> { [ XF86Tools ] };
key <FK14> { [ XF86Launch5 ] };
- key <FK15> { [ XF86MenuKB ] };
+ key <FK15> { [ XF86Launch6 ] };
+ key <FK16> { [ XF86Launch7 ] };
+ key <FK17> { [ XF86Launch8 ] };
+ key <FK18> { [ XF86Launch9 ] };
};