mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-08 23:30:15 +01:00
Merge commit 'origin/master' into transform-proposal
This commit is contained in:
commit
222c7d67c6
16 changed files with 105 additions and 70 deletions
|
|
@ -55,6 +55,7 @@ of the copyright holder.
|
|||
#include <xkbsrv.h>
|
||||
|
||||
#include "../os/osdep.h"
|
||||
#include "modinit.h"
|
||||
|
||||
#define NoSuchEvent 0x80000000
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client)
|
|||
xAnyHierarchyChangeInfo *any;
|
||||
int required_len = sizeof(xChangeDeviceHierarchyReq);
|
||||
char n;
|
||||
int rc;
|
||||
int rc = Success;
|
||||
int nchanges = 0;
|
||||
deviceHierarchyChangedEvent ev;
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
|
|||
INT32 *coords = NULL, *bufptr;
|
||||
xGetDeviceMotionEventsReply rep;
|
||||
unsigned long i;
|
||||
int rc, num_events, axes, size = 0, tsize;
|
||||
int rc, num_events, axes, size = 0;
|
||||
unsigned long nEvents;
|
||||
DeviceIntPtr dev;
|
||||
TimeStamp start, stop;
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ SOFTWARE.
|
|||
#include "dispatch.h"
|
||||
#include "swaprep.h"
|
||||
#include "dixevents.h"
|
||||
#include "mipointer.h"
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start,
|
|||
int size;
|
||||
int dflt;
|
||||
AxisInfo from, *to; /* for scaling */
|
||||
CARD32 *ocbuf, *icbuf; /* pointer to coordinates for copying */
|
||||
INT32 *ocbuf, *icbuf; /* pointer to coordinates for copying */
|
||||
INT16 *corebuf;
|
||||
AxisInfo core_axis = {0};
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start,
|
|||
*buff = xalloc(size * pDev->valuator->numMotionEvents);
|
||||
if (!(*buff))
|
||||
return 0;
|
||||
obuff = *buff;
|
||||
obuff = (char *)*buff;
|
||||
|
||||
for (i = pDev->valuator->first_motion;
|
||||
i != pDev->valuator->last_motion;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,12 @@ from The Open Group.
|
|||
#include "colormapst.h"
|
||||
#include "inputstr.h"
|
||||
|
||||
struct _Private {
|
||||
DevPrivateKey key;
|
||||
pointer value;
|
||||
struct _Private *next;
|
||||
};
|
||||
|
||||
typedef struct _PrivateDesc {
|
||||
DevPrivateKey key;
|
||||
unsigned size;
|
||||
|
|
@ -116,6 +122,65 @@ dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key)
|
|||
return &ptr->value;
|
||||
}
|
||||
|
||||
/*
|
||||
* Look up a private pointer.
|
||||
*/
|
||||
_X_EXPORT pointer
|
||||
dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key)
|
||||
{
|
||||
PrivateRec *rec = *privates;
|
||||
pointer *ptr;
|
||||
|
||||
while (rec) {
|
||||
if (rec->key == key)
|
||||
return rec->value;
|
||||
rec = rec->next;
|
||||
}
|
||||
|
||||
ptr = dixAllocatePrivate(privates, key);
|
||||
return ptr ? *ptr : NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Look up the address of a private pointer.
|
||||
*/
|
||||
_X_EXPORT pointer *
|
||||
dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key)
|
||||
{
|
||||
PrivateRec *rec = *privates;
|
||||
|
||||
while (rec) {
|
||||
if (rec->key == key)
|
||||
return &rec->value;
|
||||
rec = rec->next;
|
||||
}
|
||||
|
||||
return dixAllocatePrivate(privates, key);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set a private pointer.
|
||||
*/
|
||||
_X_EXPORT int
|
||||
dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val)
|
||||
{
|
||||
PrivateRec *rec;
|
||||
|
||||
top:
|
||||
rec = *privates;
|
||||
while (rec) {
|
||||
if (rec->key == key) {
|
||||
rec->value = val;
|
||||
return TRUE;
|
||||
}
|
||||
rec = rec->next;
|
||||
}
|
||||
|
||||
if (!dixAllocatePrivate(privates, key))
|
||||
return FALSE;
|
||||
goto top;
|
||||
}
|
||||
|
||||
/*
|
||||
* Called to free privates at object deletion time.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ fbFillRegionSolid (DrawablePtr pDrawable,
|
|||
while (n--)
|
||||
{
|
||||
#ifndef FB_ACCESS_WRAPPER
|
||||
if (!try_mmx || !pixman_fill (dst, dstStride, dstBpp,
|
||||
if (!try_mmx || !pixman_fill ((uint32_t *)dst, dstStride, dstBpp,
|
||||
pbox->x1 + dstXoff, pbox->y1 + dstYoff,
|
||||
(pbox->x2 - pbox->x1),
|
||||
(pbox->y2 - pbox->y1),
|
||||
|
|
|
|||
|
|
@ -112,6 +112,10 @@ extern void SELinuxExtensionInit(INITARGS);
|
|||
#include "xselinux.h"
|
||||
#endif
|
||||
|
||||
#ifdef XEVIE
|
||||
extern void XevieExtensionInit(INITARGS);
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
extern void SecurityExtensionInit(INITARGS);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -265,6 +265,9 @@ _X_HIDDEN void *dixLookupTab[] = {
|
|||
SYMFUNC(dixRegisterPrivateInitFunc)
|
||||
SYMFUNC(dixRegisterPrivateDeleteFunc)
|
||||
SYMFUNC(dixAllocatePrivate)
|
||||
SYMFUNC(dixLookupPrivate)
|
||||
SYMFUNC(dixLookupPrivateAddr)
|
||||
SYMFUNC(dixSetPrivate)
|
||||
SYMFUNC(dixFreePrivates)
|
||||
SYMFUNC(dixRegisterPrivateOffset)
|
||||
SYMFUNC(dixLookupPrivateOffset)
|
||||
|
|
|
|||
|
|
@ -20,12 +20,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
*****************************************************************/
|
||||
|
||||
typedef void *DevPrivateKey;
|
||||
|
||||
typedef struct _Private {
|
||||
DevPrivateKey key;
|
||||
pointer value;
|
||||
struct _Private *next;
|
||||
} PrivateRec;
|
||||
struct _Private;
|
||||
typedef struct _Private PrivateRec;
|
||||
|
||||
/*
|
||||
* Request pre-allocated private space for your driver/module.
|
||||
|
|
@ -43,61 +39,20 @@ dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key);
|
|||
/*
|
||||
* Look up a private pointer.
|
||||
*/
|
||||
static _X_INLINE pointer
|
||||
dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key)
|
||||
{
|
||||
PrivateRec *rec = *privates;
|
||||
pointer *ptr;
|
||||
|
||||
while (rec) {
|
||||
if (rec->key == key)
|
||||
return rec->value;
|
||||
rec = rec->next;
|
||||
}
|
||||
|
||||
ptr = dixAllocatePrivate(privates, key);
|
||||
return ptr ? *ptr : NULL;
|
||||
}
|
||||
pointer
|
||||
dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key);
|
||||
|
||||
/*
|
||||
* Look up the address of a private pointer.
|
||||
*/
|
||||
static _X_INLINE pointer *
|
||||
dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key)
|
||||
{
|
||||
PrivateRec *rec = *privates;
|
||||
|
||||
while (rec) {
|
||||
if (rec->key == key)
|
||||
return &rec->value;
|
||||
rec = rec->next;
|
||||
}
|
||||
|
||||
return dixAllocatePrivate(privates, key);
|
||||
}
|
||||
pointer *
|
||||
dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key);
|
||||
|
||||
/*
|
||||
* Set a private pointer.
|
||||
*/
|
||||
static _X_INLINE int
|
||||
dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val)
|
||||
{
|
||||
PrivateRec *rec;
|
||||
|
||||
top:
|
||||
rec = *privates;
|
||||
while (rec) {
|
||||
if (rec->key == key) {
|
||||
rec->value = val;
|
||||
return TRUE;
|
||||
}
|
||||
rec = rec->next;
|
||||
}
|
||||
|
||||
if (!dixAllocatePrivate(privates, key))
|
||||
return FALSE;
|
||||
goto top;
|
||||
}
|
||||
int
|
||||
dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val);
|
||||
|
||||
/*
|
||||
* Register callbacks to be called on private allocation/freeing.
|
||||
|
|
|
|||
|
|
@ -126,8 +126,10 @@ miPointerInitialize (ScreenPtr pScreen,
|
|||
static Bool
|
||||
miPointerCloseScreen (int index, ScreenPtr pScreen)
|
||||
{
|
||||
#if 0
|
||||
miPointerPtr pPointer;
|
||||
DeviceIntPtr pDev;
|
||||
#endif
|
||||
|
||||
SetupScreen(pScreen);
|
||||
|
||||
|
|
|
|||
|
|
@ -757,7 +757,9 @@ ClientAuthorized(ClientPtr client,
|
|||
}
|
||||
}
|
||||
priv->auth_id = auth_id;
|
||||
#ifdef HAVE_LAUNCHD
|
||||
done:
|
||||
#endif
|
||||
priv->conn_time = 0;
|
||||
|
||||
#ifdef XDMCP
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ from The Open Group.
|
|||
#include <X11/Xauth.h>
|
||||
#include "misc.h"
|
||||
#include "os.h"
|
||||
#include "osdep.h"
|
||||
#include "dixstruct.h"
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
|
|
|||
14
os/xdmauth.c
14
os/xdmauth.c
|
|
@ -69,7 +69,7 @@ XdmAuthenticationValidator (ARRAY8Ptr privateData, ARRAY8Ptr incomingData,
|
|||
{
|
||||
XdmAuthKeyPtr incoming;
|
||||
|
||||
XdmcpUnwrap (incomingData->data, &privateKey,
|
||||
XdmcpUnwrap (incomingData->data, (unsigned char *)&privateKey,
|
||||
incomingData->data,incomingData->length);
|
||||
if (packet_type == ACCEPT) {
|
||||
if (incomingData->length != 8)
|
||||
|
|
@ -89,7 +89,8 @@ XdmAuthenticationGenerator (ARRAY8Ptr privateData, ARRAY8Ptr outgoingData,
|
|||
outgoingData->data = 0;
|
||||
if (packet_type == REQUEST) {
|
||||
if (XdmcpAllocARRAY8 (outgoingData, 8))
|
||||
XdmcpWrap (&rho, &privateKey, outgoingData->data, 8);
|
||||
XdmcpWrap ((unsigned char *)&rho, (unsigned char *)&privateKey,
|
||||
outgoingData->data, 8);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -99,7 +100,8 @@ XdmAuthenticationAddAuth (int name_len, char *name,
|
|||
int data_len, char *data)
|
||||
{
|
||||
Bool ret;
|
||||
XdmcpUnwrap (data, (unsigned char *)&privateKey, data, data_len);
|
||||
XdmcpUnwrap ((unsigned char *)data, (unsigned char *)&privateKey,
|
||||
(unsigned char *)data, data_len);
|
||||
authFromXDMCP = TRUE;
|
||||
ret = AddAuthorization (name_len, name, data_len, data);
|
||||
authFromXDMCP = FALSE;
|
||||
|
|
@ -152,7 +154,7 @@ XdmAuthenticationInit (char *cookie, int cookie_len)
|
|||
}
|
||||
XdmcpGenerateKey (&rho);
|
||||
XdmcpRegisterAuthentication (XdmAuthenticationName, XdmAuthenticationNameLen,
|
||||
(unsigned char *)&rho,
|
||||
(char *)&rho,
|
||||
sizeof (rho),
|
||||
(ValidatorFunc)XdmAuthenticationValidator,
|
||||
(GeneratorFunc)XdmAuthenticationGenerator,
|
||||
|
|
@ -387,7 +389,7 @@ XdmCheckCookie (unsigned short cookie_length, char *cookie,
|
|||
if (!plain)
|
||||
return (XID) -1;
|
||||
for (auth = xdmAuth; auth; auth=auth->next) {
|
||||
XdmcpUnwrap (cookie, (unsigned char *)&auth->key, plain, cookie_length);
|
||||
XdmcpUnwrap ((unsigned char *)cookie, (unsigned char *)&auth->key, plain, cookie_length);
|
||||
if ((client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, xclient, reason)) != NULL)
|
||||
{
|
||||
client->next = xdmClients;
|
||||
|
|
@ -432,7 +434,7 @@ XdmToID (unsigned short cookie_length, char *cookie)
|
|||
if (!plain)
|
||||
return (XID) -1;
|
||||
for (auth = xdmAuth; auth; auth=auth->next) {
|
||||
XdmcpUnwrap (cookie, (unsigned char *)&auth->key, plain, cookie_length);
|
||||
XdmcpUnwrap ((unsigned char *)cookie, (unsigned char *)&auth->key, plain, cookie_length);
|
||||
if ((client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, NULL, NULL)) != NULL)
|
||||
{
|
||||
xfree (client);
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ register int i;
|
|||
int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups];
|
||||
|
||||
if ((!xkb) || (!XkbKeycodeInRange(xkb,key)) || (!xkb->map) ||
|
||||
(!xkb->map->types)||(!newTypes)||((groups&XkbAllGroupsMask)==0)||
|
||||
(!xkb->map->types)||((groups&XkbAllGroupsMask)==0)||
|
||||
(nGroups>XkbNumKbdGroups)) {
|
||||
return BadMatch;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -882,14 +882,13 @@ XkbSrvInfoPtr xkbi;
|
|||
((xE[i].u.u.type==KeyPress)||(xE[i].u.u.type==KeyRelease)||
|
||||
(xE[i].u.u.type==DeviceKeyPress)||
|
||||
(xE[i].u.u.type == DeviceKeyRelease))) {
|
||||
XkbStatePtr s= &xkbi->state;
|
||||
DebugF("[xkb] XKbFilterWriteEvents (non-XKB):\n");
|
||||
DebugF("[xkb] event= 0x%04x\n",xE[i].u.keyButtonPointer.state);
|
||||
DebugF("[xkb] lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods,
|
||||
s->grab_mods);
|
||||
DebugF("[xkb] lookup= 0x%02x, grab= 0x%02x\n",xkbi->state.lookup_mods,
|
||||
xkbi->state.grab_mods);
|
||||
DebugF("[xkb] compat lookup= 0x%02x, grab= 0x%02x\n",
|
||||
s->compat_lookup_mods,
|
||||
s->compat_grab_mods);
|
||||
xkbi->state.compat_lookup_mods,
|
||||
xkbi->state.compat_grab_mods);
|
||||
}
|
||||
if ( (type>=KeyPress)&&(type<=MotionNotify) ) {
|
||||
CARD16 old,new;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue