Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts: hw/xfree86/Makefile.am hw/xfree86/dri/dri.c
This commit is contained in:
commit
2c6d471088
|
@ -1,16 +1,16 @@
|
|||
SUBDIRS = glx mesa
|
||||
|
||||
# someone could get really crazy someday and add support for the SI...
|
||||
|
||||
# xwin/darwin/xfree86 have their accel support under the DDX
|
||||
|
||||
APPLE_EXTRAS = \
|
||||
apple/aglGlx.c \
|
||||
apple/indirect.c
|
||||
if BUILD_DARWIN
|
||||
DARWIN_SUBDIRS = apple
|
||||
endif
|
||||
SUBDIRS = glx mesa $(DARWIN_SUBDIRS)
|
||||
|
||||
WINDOWS_EXTRAS = \
|
||||
windows/ChangeLog \
|
||||
windows/glwindows.h \
|
||||
windows/glwrap.c \
|
||||
windows/indirect.c
|
||||
|
||||
EXTRA_DIST = symlink-mesa.sh $(APPLE_EXTRAS) $(WINDOWS_EXTRAS)
|
||||
EXTRA_DIST = symlink-mesa.sh $(WINDOWS_EXTRAS)
|
||||
|
|
15
GL/apple/Makefile.am
Normal file
15
GL/apple/Makefile.am
Normal file
|
@ -0,0 +1,15 @@
|
|||
AM_CFLAGS = -I$(top_srcdir) \
|
||||
-I$(top_srcdir)/hw/darwin/quartz \
|
||||
-I$(top_srcdir)/GL/glx \
|
||||
-I$(top_srcdir)/hw/darwin/quartz/cr \
|
||||
-I$(top_srcdir)/GL/include
|
||||
|
||||
if HAVE_AGL_FRAMEWORK
|
||||
noinst_LIBRARIES = libAGLcore.a
|
||||
libAGLcore_a_SOURCES = aglGlx.c \
|
||||
$(top_srcdir)/hw/darwin/quartz/xpr/x-list.c \
|
||||
$(top_srcdir)/hw/darwin/quartz/xpr/x-list.h \
|
||||
$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c \
|
||||
$(top_srcdir)/hw/darwin/quartz/xpr/x-hash.h \
|
||||
$(top_srcdir)/hw/dmx/glxProxy/compsize.c
|
||||
endif
|
2142
GL/apple/indirect.c
2142
GL/apple/indirect.c
File diff suppressed because it is too large
Load Diff
|
@ -39,6 +39,11 @@
|
|||
#include <byteswap.h>
|
||||
#elif defined(USE_SYS_ENDIAN_H)
|
||||
#include <sys/endian.h>
|
||||
#elif defined(__APPLE__)
|
||||
#include <libkern/OSByteOrder.h>
|
||||
#define bswap_16 OSSwapInt16
|
||||
#define bswap_32 OSSwapInt32
|
||||
#define bswap_64 OSSwapInt64
|
||||
#else
|
||||
#define bswap_16(value) \
|
||||
((((value) & 0xff) << 8) | ((value) >> 8))
|
||||
|
|
|
@ -496,11 +496,11 @@ int __glXDispSwap_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc)
|
|||
GLXDrawable *drawId;
|
||||
int *buffer;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
||||
(void) drawId;
|
||||
(void) buffer;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
|
||||
__GLX_SWAP_SHORT(&req->length);
|
||||
|
|
|
@ -495,6 +495,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
|
|||
context->base.loseCurrent = __glXDRIcontextLoseCurrent;
|
||||
context->base.copy = __glXDRIcontextCopy;
|
||||
context->base.forceCurrent = __glXDRIcontextForceCurrent;
|
||||
context->base.pScreen = screen->base.pScreen;
|
||||
|
||||
context->base.textureFromPixmap = &__glXDRItextureFromPixmap;
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ nodist_libmain_la_SOURCES = accum.c \
|
|||
rastpos.c \
|
||||
rbadaptors.c \
|
||||
renderbuffer.c \
|
||||
shaders.c \
|
||||
state.c \
|
||||
stencil.c \
|
||||
texcompress.c \
|
||||
|
|
|
@ -27,8 +27,13 @@ nodist_libshader_la_SOURCES = \
|
|||
atifragshader.c \
|
||||
nvfragparse.c \
|
||||
nvprogram.c \
|
||||
nvvertexec.c \
|
||||
nvvertparse.c \
|
||||
nvvertparse.c \
|
||||
prog_debug.c \
|
||||
prog_execute.c \
|
||||
prog_instruction.c \
|
||||
prog_parameter.c \
|
||||
prog_print.c \
|
||||
program.c \
|
||||
shaderobjects.c \
|
||||
shaderobjects_3dlabs.c
|
||||
programopt.c \
|
||||
prog_statevars.c \
|
||||
shader_api.c
|
||||
|
|
|
@ -18,23 +18,23 @@ INCLUDES = -I@MESA_SOURCE@/include \
|
|||
-I../.. \
|
||||
-I$(top_srcdir)/hw/xfree86/os-support
|
||||
|
||||
nodist_libslang_la_SOURCES = slang_analyse.c \
|
||||
slang_assemble_assignment.c \
|
||||
slang_assemble.c \
|
||||
slang_assemble_conditional.c \
|
||||
slang_assemble_constructor.c \
|
||||
slang_assemble_typeinfo.c \
|
||||
nodist_libslang_la_SOURCES = slang_builtin.c \
|
||||
slang_codegen.c \
|
||||
slang_compile.c \
|
||||
slang_compile_function.c \
|
||||
slang_compile_operation.c \
|
||||
slang_compile_struct.c \
|
||||
slang_compile_variable.c \
|
||||
slang_execute.c \
|
||||
slang_execute_x86.c \
|
||||
slang_export.c \
|
||||
slang_library_texsample.c \
|
||||
slang_emit.c \
|
||||
slang_ir.c \
|
||||
slang_label.c \
|
||||
slang_library_noise.c \
|
||||
slang_link.c \
|
||||
slang_log.c \
|
||||
slang_preprocess.c \
|
||||
slang_print.c \
|
||||
slang_simplify.c \
|
||||
slang_storage.c \
|
||||
slang_utility.c
|
||||
slang_typeinfo.c \
|
||||
slang_utility.c \
|
||||
slang_vartable.c
|
||||
|
|
|
@ -23,7 +23,6 @@ nodist_libswrast_la_SOURCES = s_aaline.c \
|
|||
s_aatriangle.c \
|
||||
s_accum.c \
|
||||
s_alpha.c \
|
||||
s_arbshader.c \
|
||||
s_atifragshader.c \
|
||||
s_bitmap.c \
|
||||
s_blend.c \
|
||||
|
@ -35,11 +34,11 @@ nodist_libswrast_la_SOURCES = s_aaline.c \
|
|||
s_drawpix.c \
|
||||
s_feedback.c \
|
||||
s_fog.c \
|
||||
s_fragprog.c \
|
||||
s_imaging.c \
|
||||
s_lines.c \
|
||||
s_logic.c \
|
||||
s_masking.c \
|
||||
s_nvfragprog.c \
|
||||
s_points.c \
|
||||
s_readpix.c \
|
||||
s_span.c \
|
||||
|
|
|
@ -23,7 +23,6 @@ nodist_libtnl_la_SOURCES = t_context.c \
|
|||
t_pipeline.c \
|
||||
t_vb_arbprogram.c \
|
||||
t_vb_arbprogram_sse.c \
|
||||
t_vb_arbshader.c \
|
||||
t_vb_cull.c \
|
||||
t_vb_fog.c \
|
||||
t_vb_light.c \
|
||||
|
|
|
@ -116,8 +116,7 @@ int XagAppGroupFree(
|
|||
return Success;
|
||||
}
|
||||
|
||||
/* static */
|
||||
void XagClientStateChange(
|
||||
static void XagClientStateChange(
|
||||
CallbackListPtr* pcbl,
|
||||
pointer nulldata,
|
||||
pointer calldata)
|
||||
|
@ -172,21 +171,6 @@ void XagClientStateChange(
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
XagExtensionInit(INITARGS)
|
||||
{
|
||||
if (AddExtension (XAGNAME,
|
||||
0,
|
||||
XagNumberErrors,
|
||||
ProcXagDispatch,
|
||||
SProcXagDispatch,
|
||||
XagResetProc,
|
||||
StandardMinorOpcode)) {
|
||||
RT_APPGROUP = CreateNewResourceType (XagAppGroupFree);
|
||||
XaceRegisterCallback(XACE_AUTH_AVAIL, XagCallClientStateChange, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static
|
||||
void XagResetProc(
|
||||
|
@ -393,8 +377,7 @@ int AttrValidate(
|
|||
return client->noClientException;
|
||||
}
|
||||
|
||||
/* static */
|
||||
int ProcXagCreate (
|
||||
static int ProcXagCreate (
|
||||
register ClientPtr client)
|
||||
{
|
||||
REQUEST (xXagCreateReq);
|
||||
|
@ -425,8 +408,7 @@ int ProcXagCreate (
|
|||
return client->noClientException;
|
||||
}
|
||||
|
||||
/* static */
|
||||
int ProcXagDestroy(
|
||||
static int ProcXagDestroy(
|
||||
register ClientPtr client)
|
||||
{
|
||||
AppGroupPtr pAppGrp;
|
||||
|
@ -743,18 +725,7 @@ XID XagId(
|
|||
return (client->appgroup ? client->appgroup->appgroupId : 0);
|
||||
}
|
||||
|
||||
void XagGetDeltaInfo(
|
||||
ClientPtr client,
|
||||
CARD32* buf)
|
||||
{
|
||||
*buf++ = (CARD32) client->appgroup->default_root;
|
||||
*buf++ = (CARD32) client->appgroup->root_visual;
|
||||
*buf++ = (CARD32) client->appgroup->default_colormap;
|
||||
*buf++ = (CARD32) client->appgroup->black_pixel;
|
||||
*buf = (CARD32) client->appgroup->white_pixel;
|
||||
}
|
||||
|
||||
void XagCallClientStateChange(
|
||||
static void XagCallClientStateChange(
|
||||
CallbackListPtr *pcbl,
|
||||
pointer nulldata,
|
||||
pointer calldata)
|
||||
|
@ -785,3 +756,18 @@ void XagCallClientStateChange(
|
|||
XagClientStateChange (NULL, NULL, (pointer)&clientinfo);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
XagExtensionInit(INITARGS)
|
||||
{
|
||||
if (AddExtension (XAGNAME,
|
||||
0,
|
||||
XagNumberErrors,
|
||||
ProcXagDispatch,
|
||||
SProcXagDispatch,
|
||||
XagResetProc,
|
||||
StandardMinorOpcode)) {
|
||||
RT_APPGROUP = CreateNewResourceType (XagAppGroupFree);
|
||||
XaceRegisterCallback(XACE_AUTH_AVAIL, XagCallClientStateChange, NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,12 +50,6 @@ extern ClientPtr XagLeader(
|
|||
ClientPtr /* client */
|
||||
);
|
||||
|
||||
extern void XagCallClientStateChange(
|
||||
CallbackListPtr * /* pcbl */,
|
||||
pointer /* nulldata */,
|
||||
pointer /* calldata */
|
||||
);
|
||||
|
||||
extern Bool XagIsControlledRoot (
|
||||
ClientPtr /* client */,
|
||||
WindowPtr /* pParent */
|
||||
|
@ -65,22 +59,6 @@ extern XID XagId (
|
|||
ClientPtr /* client */
|
||||
);
|
||||
|
||||
extern void XagGetDeltaInfo (
|
||||
ClientPtr /* client */,
|
||||
CARD32* /* buf */
|
||||
);
|
||||
|
||||
extern void XagClientStateChange(
|
||||
CallbackListPtr* pcbl,
|
||||
pointer nulldata,
|
||||
pointer calldata);
|
||||
|
||||
extern int ProcXagCreate (
|
||||
register ClientPtr client);
|
||||
|
||||
extern int ProcXagDestroy(
|
||||
register ClientPtr client);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _APPGROUP_SRV_H_ */
|
||||
|
|
|
@ -77,7 +77,7 @@ int PanoramiXPixHeight = 0;
|
|||
_X_EXPORT int PanoramiXNumScreens = 0;
|
||||
|
||||
_X_EXPORT PanoramiXData *panoramiXdataPtr = NULL;
|
||||
RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL};
|
||||
static RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL};
|
||||
|
||||
static int PanoramiXNumDepths;
|
||||
static DepthPtr PanoramiXDepths;
|
||||
|
@ -109,7 +109,6 @@ static void PanoramiXResetProc(ExtensionEntry*);
|
|||
#include "panoramiXh.h"
|
||||
|
||||
int (* SavedProcVector[256]) (ClientPtr client) = { NULL, };
|
||||
ScreenInfo *GlobalScrInfo = NULL;
|
||||
|
||||
static int PanoramiXGCIndex = -1;
|
||||
static int PanoramiXScreenIndex = -1;
|
||||
|
@ -135,7 +134,7 @@ static void XineramaChangeClip(GCPtr, int, pointer, int);
|
|||
static void XineramaDestroyClip(GCPtr);
|
||||
static void XineramaCopyClip(GCPtr, GCPtr);
|
||||
|
||||
GCFuncs XineramaGCFuncs = {
|
||||
static GCFuncs XineramaGCFuncs = {
|
||||
XineramaValidateGC, XineramaChangeGC, XineramaCopyGC, XineramaDestroyGC,
|
||||
XineramaChangeClip, XineramaDestroyClip, XineramaCopyClip
|
||||
};
|
||||
|
@ -168,7 +167,7 @@ XineramaCloseScreen (int i, ScreenPtr pScreen)
|
|||
return (*pScreen->CloseScreen) (i, pScreen);
|
||||
}
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
XineramaCreateGC(GCPtr pGC)
|
||||
{
|
||||
ScreenPtr pScreen = pGC->pScreen;
|
||||
|
@ -330,8 +329,6 @@ XineramaDestroyClip(GCPtr pGC)
|
|||
Xinerama_GC_FUNC_EPILOGUE (pGC);
|
||||
}
|
||||
|
||||
|
||||
|
||||
_X_EXPORT int
|
||||
XineramaDeleteResource(pointer data, XID id)
|
||||
{
|
||||
|
@ -339,32 +336,11 @@ XineramaDeleteResource(pointer data, XID id)
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
XineramaFindIDOnAnyScreen(pointer resource, XID id, pointer privdata)
|
||||
{
|
||||
PanoramiXRes *res = (PanoramiXRes*)resource;
|
||||
int j;
|
||||
|
||||
FOR_NSCREENS(j)
|
||||
if(res->info[j].id == *((XID*)privdata)) return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
PanoramiXRes *
|
||||
PanoramiXFindIDOnAnyScreen(RESTYPE type, XID id)
|
||||
{
|
||||
return LookupClientResourceComplex(clients[CLIENT_ID(id)], type,
|
||||
XineramaFindIDOnAnyScreen, &id);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
int screen;
|
||||
int id;
|
||||
} PanoramiXSearchData;
|
||||
|
||||
|
||||
static Bool
|
||||
XineramaFindIDByScrnum(pointer resource, XID id, pointer privdata)
|
||||
{
|
||||
|
@ -389,23 +365,6 @@ PanoramiXFindIDByScrnum(RESTYPE type, XID id, int screen)
|
|||
XineramaFindIDByScrnum, &data);
|
||||
}
|
||||
|
||||
WindowPtr
|
||||
PanoramiXChangeWindow(int ScrnNum, WindowPtr pWin)
|
||||
{
|
||||
int num = pWin->drawable.pScreen->myNum;
|
||||
|
||||
if(num != ScrnNum) {
|
||||
PanoramiXRes *win;
|
||||
|
||||
win = PanoramiXFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, num);
|
||||
|
||||
if (win)
|
||||
pWin = (WindowPtr) LookupIDByType(win->info[ScrnNum].id, RT_WINDOW);
|
||||
}
|
||||
|
||||
return pWin;
|
||||
}
|
||||
|
||||
typedef struct _connect_callback_list {
|
||||
void (*func)(void);
|
||||
struct _connect_callback_list *next;
|
||||
|
@ -496,7 +455,6 @@ void PanoramiXExtensionInit(int argc, char *argv[])
|
|||
if (noPanoramiXExtension)
|
||||
return;
|
||||
|
||||
GlobalScrInfo = &screenInfo; /* For debug visibility */
|
||||
PanoramiXNumScreens = screenInfo.numScreens;
|
||||
if (PanoramiXNumScreens == 1) { /* Only 1 screen */
|
||||
noPanoramiXExtension = TRUE;
|
||||
|
|
|
@ -94,18 +94,6 @@ typedef struct {
|
|||
(a).root = WindowTable[0]->drawable.id; \
|
||||
}
|
||||
|
||||
#define FORCE_WIN(a) { \
|
||||
if ((win = PanoramiXFindIDOnAnyScreen(XRT_WINDOW, a))) { \
|
||||
(a) = win->info[0].id; /* Real ID */ \
|
||||
} \
|
||||
}
|
||||
|
||||
#define FORCE_CMAP(a) { \
|
||||
if ((win = PanoramiXFindIDOnAnyScreen(XRT_COLORMAP, a))) { \
|
||||
(a) = win->info[0].id; /* Real ID */ \
|
||||
} \
|
||||
}
|
||||
|
||||
#define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared)
|
||||
|
||||
#define SKIP_FAKE_WINDOW(a) if(!LookupIDByType(a, XRT_WINDOW)) return
|
||||
|
|
|
@ -19,10 +19,10 @@ extern int PanoramiXGetGeometry(ClientPtr client);
|
|||
extern int PanoramiXTranslateCoords(ClientPtr client);
|
||||
extern int PanoramiXCreatePixmap(ClientPtr client);
|
||||
extern int PanoramiXFreePixmap(ClientPtr client);
|
||||
extern int PanoramiXCreateGC(ClientPtr client);
|
||||
extern int PanoramiXChangeGC(ClientPtr client);
|
||||
extern int PanoramiXCopyGC(ClientPtr client);
|
||||
extern int PanoramiXCopyColormapAndFree(ClientPtr client);
|
||||
extern int PanoramiXCreateGC(ClientPtr client);
|
||||
extern int PanoramiXSetDashes(ClientPtr client);
|
||||
extern int PanoramiXSetClipRectangles(ClientPtr client);
|
||||
extern int PanoramiXFreeGC(ClientPtr client);
|
||||
|
@ -64,7 +64,6 @@ PROC_EXTERN(ProcPanoramiXGetScreenSize);
|
|||
|
||||
PROC_EXTERN(ProcXineramaQueryScreens);
|
||||
PROC_EXTERN(ProcXineramaIsActive);
|
||||
extern Bool XineramaCreateGC(GCPtr pGC);
|
||||
|
||||
extern int SProcPanoramiXDispatch(ClientPtr client);
|
||||
|
||||
|
@ -72,6 +71,4 @@ extern char *ConnectionInfo;
|
|||
extern int connBlockScreenStart;
|
||||
extern xConnSetupPrefix connSetupPrefix;
|
||||
|
||||
extern ScreenInfo *GlobalScrInfo;
|
||||
extern int (* SavedProcVector[256]) (ClientPtr client);
|
||||
|
||||
|
|
|
@ -12,14 +12,11 @@ extern int PanoramiXNumScreens;
|
|||
extern PanoramiXData *panoramiXdataPtr;
|
||||
extern int PanoramiXPixWidth;
|
||||
extern int PanoramiXPixHeight;
|
||||
extern RegionRec PanoramiXScreenRegion;
|
||||
extern XID *PanoramiXVisualTable;
|
||||
|
||||
extern void PanoramiXConsolidate(void);
|
||||
extern Bool PanoramiXCreateConnectionBlock(void);
|
||||
extern PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int);
|
||||
extern PanoramiXRes * PanoramiXFindIDOnAnyScreen(RESTYPE, XID);
|
||||
extern WindowPtr PanoramiXChangeWindow(int, WindowPtr);
|
||||
extern Bool XineramaRegisterConnectionBlockCallback(void (*func)(void));
|
||||
extern int XineramaDeleteResource(pointer, XID);
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ static unsigned char ScreenSaverReqCode = 0;
|
|||
#endif
|
||||
static int ScreenSaverEventBase = 0;
|
||||
|
||||
extern DISPATCH_PROC(ProcScreenSaverQueryInfo);
|
||||
static DISPATCH_PROC(ProcScreenSaverQueryInfo);
|
||||
static DISPATCH_PROC(ProcScreenSaverDispatch);
|
||||
static DISPATCH_PROC(ProcScreenSaverQueryVersion);
|
||||
static DISPATCH_PROC(ProcScreenSaverSelectInput);
|
||||
|
@ -774,7 +774,7 @@ ProcScreenSaverQueryVersion (client)
|
|||
return (client->noClientException);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
ProcScreenSaverQueryInfo (client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
|
|
|
@ -77,7 +77,7 @@ typedef struct {
|
|||
#define AUTHID(client) \
|
||||
(((SecurityClientStateRec*)STATEPTR(client))->authId)
|
||||
|
||||
CallbackListPtr SecurityValidateGroupCallback = NULL; /* see security.h */
|
||||
static CallbackListPtr SecurityValidateGroupCallback = NULL;
|
||||
|
||||
RESTYPE SecurityAuthorizationResType; /* resource type for authorizations */
|
||||
|
||||
|
@ -1187,6 +1187,7 @@ CALLBACK(SecurityCheckMapAccess)
|
|||
if (STATEPTR(rec->client) &&
|
||||
(TRUSTLEVEL(rec->client) != XSecurityClientTrusted) &&
|
||||
(pWin->drawable.class == InputOnly) &&
|
||||
pWin->parent && pWin->parent->parent &&
|
||||
(TRUSTLEVEL(wClient(pWin->parent)) == XSecurityClientTrusted))
|
||||
|
||||
rec->rval = FALSE;
|
||||
|
|
|
@ -72,15 +72,6 @@ typedef struct {
|
|||
struct _OtherClients *eventClients; /* clients wanting events */
|
||||
} SecurityAuthorizationRec, *SecurityAuthorizationPtr;
|
||||
|
||||
/* The following callback is called when a GenerateAuthorization request
|
||||
* is processed to sanity check the group argument. The call data will
|
||||
* be a pointer to a SecurityValidateGroupInfoRec (below).
|
||||
* Functions registered on this callback are expected to examine the
|
||||
* group and set the valid field to TRUE if they recognize the group as a
|
||||
* legitimate group. If they don't recognize it, they should not change the
|
||||
* valid field.
|
||||
*/
|
||||
extern CallbackListPtr SecurityValidateGroupCallback;
|
||||
typedef struct {
|
||||
XID group; /* the group that was sent in GenerateAuthorization */
|
||||
Bool valid; /* did anyone recognize it? if so, set to TRUE */
|
||||
|
|
23
Xext/shm.c
23
Xext/shm.c
|
@ -119,9 +119,7 @@ static int pixmapFormat;
|
|||
static int shmPixFormat[MAXSCREENS];
|
||||
static ShmFuncsPtr shmFuncs[MAXSCREENS];
|
||||
static DestroyPixmapProcPtr destroyPixmap[MAXSCREENS];
|
||||
#ifdef PIXPRIV
|
||||
static int shmPixmapPrivate;
|
||||
#endif
|
||||
static ShmFuncs miFuncs = {NULL, miShmPutImage};
|
||||
static ShmFuncs fbFuncs = {fbShmCreatePixmap, fbShmPutImage};
|
||||
|
||||
|
@ -237,7 +235,6 @@ ShmExtensionInit(INITARGS)
|
|||
destroyPixmap[i] = screenInfo.screens[i]->DestroyPixmap;
|
||||
screenInfo.screens[i]->DestroyPixmap = ShmDestroyPixmap;
|
||||
}
|
||||
#ifdef PIXPRIV
|
||||
shmPixmapPrivate = AllocatePixmapPrivateIndex();
|
||||
for (i = 0; i < screenInfo.numScreens; i++)
|
||||
{
|
||||
|
@ -245,7 +242,6 @@ ShmExtensionInit(INITARGS)
|
|||
shmPixmapPrivate, 0))
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
ShmSegType = CreateNewResourceType(ShmDetachSegment);
|
||||
|
@ -299,22 +295,7 @@ ShmDestroyPixmap (PixmapPtr pPixmap)
|
|||
if (pPixmap->refcnt == 1)
|
||||
{
|
||||
ShmDescPtr shmdesc;
|
||||
#ifdef PIXPRIV
|
||||
shmdesc = (ShmDescPtr) pPixmap->devPrivates[shmPixmapPrivate].ptr;
|
||||
#else
|
||||
char *base = (char *) pPixmap->devPrivate.ptr;
|
||||
|
||||
if (base != (pointer) (pPixmap + 1))
|
||||
{
|
||||
for (shmdesc = Shmsegs; shmdesc; shmdesc = shmdesc->next)
|
||||
{
|
||||
if (shmdesc->addr <= base && base <= shmdesc->addr + shmdesc->size)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
shmdesc = 0;
|
||||
#endif
|
||||
if (shmdesc)
|
||||
ShmDetachSegment ((pointer) shmdesc, pPixmap->drawable.id);
|
||||
}
|
||||
|
@ -781,9 +762,7 @@ CreatePmap:
|
|||
shmdesc->addr + stuff->offset);
|
||||
|
||||
if (pMap) {
|
||||
#ifdef PIXPRIV
|
||||
pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc;
|
||||
#endif
|
||||
shmdesc->refcnt++;
|
||||
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
pMap->drawable.id = newPix->info[j].id;
|
||||
|
@ -1097,9 +1076,7 @@ CreatePmap:
|
|||
shmdesc->addr + stuff->offset);
|
||||
if (pMap)
|
||||
{
|
||||
#ifdef PIXPRIV
|
||||
pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc;
|
||||
#endif
|
||||
shmdesc->refcnt++;
|
||||
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
pMap->drawable.id = stuff->pid;
|
||||
|
|
|
@ -37,10 +37,10 @@ CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0};
|
|||
* from guessing extension major opcodes and using the extension even though
|
||||
* the extension can't be listed or queried.
|
||||
*/
|
||||
int (*UntrustedProcVector[256])(
|
||||
static int (*UntrustedProcVector[256])(
|
||||
ClientPtr /*client*/
|
||||
);
|
||||
int (*SwappedUntrustedProcVector[256])(
|
||||
static int (*SwappedUntrustedProcVector[256])(
|
||||
ClientPtr /*client*/
|
||||
);
|
||||
|
||||
|
|
10
Xext/xace.h
10
Xext/xace.h
|
@ -82,16 +82,6 @@ extern int XaceHook(
|
|||
/* From the original Security extension...
|
||||
*/
|
||||
|
||||
/* Proc vectors for untrusted clients, swapped and unswapped versions.
|
||||
* These are the same as the normal proc vectors except that extensions
|
||||
* that haven't declared themselves secure will have ProcBadRequest plugged
|
||||
* in for their major opcode dispatcher. This prevents untrusted clients
|
||||
* from guessing extension major opcodes and using the extension even though
|
||||
* the extension can't be listed or queried.
|
||||
*/
|
||||
extern int (*UntrustedProcVector[256])(ClientPtr client);
|
||||
extern int (*SwappedUntrustedProcVector[256])(ClientPtr client);
|
||||
|
||||
extern void XaceCensorImage(
|
||||
ClientPtr client,
|
||||
RegionPtr pVisibleRegion,
|
||||
|
|
|
@ -52,7 +52,7 @@ of the copyright holder.
|
|||
#include "inputstr.h"
|
||||
#include "windowstr.h"
|
||||
#include "cursorstr.h"
|
||||
#include <X11/extensions/XKBsrv.h>
|
||||
#include <xkbsrv.h>
|
||||
|
||||
#include "../os/osdep.h"
|
||||
|
||||
|
@ -105,7 +105,7 @@ typedef struct {
|
|||
} xevieKeycQueueRec, *xevieKeycQueuePtr;
|
||||
|
||||
#define KEYC_QUEUE_SIZE 100
|
||||
xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {{0, NULL}};
|
||||
static xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {{0, NULL}};
|
||||
static int keycqHead = 0, keycqTail = 0;
|
||||
|
||||
static int ProcDispatch (ClientPtr), SProcDispatch (ClientPtr);
|
||||
|
|
|
@ -441,6 +441,8 @@ ProcXTestFakeInput(client)
|
|||
(root->drawable.pScreen,
|
||||
ev->u.keyButtonPointer.rootX,
|
||||
ev->u.keyButtonPointer.rootY, FALSE);
|
||||
dev->valuator->lastx = ev->u.keyButtonPointer.rootX;
|
||||
dev->valuator->lasty = ev->u.keyButtonPointer.rootY;
|
||||
break;
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
|
|
261
Xi/chgfctl.c
261
Xi/chgfctl.c
|
@ -89,137 +89,13 @@ SProcXChangeFeedbackControl(register ClientPtr client)
|
|||
return (ProcXChangeFeedbackControl(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Change the control attributes.
|
||||
*
|
||||
*/
|
||||
|
||||
int
|
||||
ProcXChangeFeedbackControl(ClientPtr client)
|
||||
{
|
||||
unsigned len;
|
||||
DeviceIntPtr dev;
|
||||
KbdFeedbackPtr k;
|
||||
PtrFeedbackPtr p;
|
||||
IntegerFeedbackPtr i;
|
||||
StringFeedbackPtr s;
|
||||
BellFeedbackPtr b;
|
||||
LedFeedbackPtr l;
|
||||
|
||||
REQUEST(xChangeFeedbackControlReq);
|
||||
REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
|
||||
|
||||
len = stuff->length - (sizeof(xChangeFeedbackControlReq) >> 2);
|
||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||
if (dev == NULL) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
||||
BadDevice);
|
||||
return Success;
|
||||
}
|
||||
|
||||
switch (stuff->feedbackid) {
|
||||
case KbdFeedbackClass:
|
||||
if (len != (sizeof(xKbdFeedbackCtl) >> 2)) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
||||
0, BadLength);
|
||||
return Success;
|
||||
}
|
||||
for (k = dev->kbdfeed; k; k = k->next)
|
||||
if (k->ctrl.id == ((xKbdFeedbackCtl *) & stuff[1])->id) {
|
||||
ChangeKbdFeedback(client, dev, stuff->mask, k,
|
||||
(xKbdFeedbackCtl *) & stuff[1]);
|
||||
return Success;
|
||||
}
|
||||
break;
|
||||
case PtrFeedbackClass:
|
||||
if (len != (sizeof(xPtrFeedbackCtl) >> 2)) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
||||
0, BadLength);
|
||||
return Success;
|
||||
}
|
||||
for (p = dev->ptrfeed; p; p = p->next)
|
||||
if (p->ctrl.id == ((xPtrFeedbackCtl *) & stuff[1])->id) {
|
||||
ChangePtrFeedback(client, dev, stuff->mask, p,
|
||||
(xPtrFeedbackCtl *) & stuff[1]);
|
||||
return Success;
|
||||
}
|
||||
break;
|
||||
case StringFeedbackClass:
|
||||
{
|
||||
register char n;
|
||||
xStringFeedbackCtl *f = ((xStringFeedbackCtl *) & stuff[1]);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&f->num_keysyms, n);
|
||||
}
|
||||
if (len != ((sizeof(xStringFeedbackCtl) >> 2) + f->num_keysyms)) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
||||
0, BadLength);
|
||||
return Success;
|
||||
}
|
||||
for (s = dev->stringfeed; s; s = s->next)
|
||||
if (s->ctrl.id == ((xStringFeedbackCtl *) & stuff[1])->id) {
|
||||
ChangeStringFeedback(client, dev, stuff->mask, s,
|
||||
(xStringFeedbackCtl *) & stuff[1]);
|
||||
return Success;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IntegerFeedbackClass:
|
||||
if (len != (sizeof(xIntegerFeedbackCtl) >> 2)) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
||||
0, BadLength);
|
||||
return Success;
|
||||
}
|
||||
for (i = dev->intfeed; i; i = i->next)
|
||||
if (i->ctrl.id == ((xIntegerFeedbackCtl *) & stuff[1])->id) {
|
||||
ChangeIntegerFeedback(client, dev, stuff->mask, i,
|
||||
(xIntegerFeedbackCtl *) & stuff[1]);
|
||||
return Success;
|
||||
}
|
||||
break;
|
||||
case LedFeedbackClass:
|
||||
if (len != (sizeof(xLedFeedbackCtl) >> 2)) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
||||
0, BadLength);
|
||||
return Success;
|
||||
}
|
||||
for (l = dev->leds; l; l = l->next)
|
||||
if (l->ctrl.id == ((xLedFeedbackCtl *) & stuff[1])->id) {
|
||||
ChangeLedFeedback(client, dev, stuff->mask, l,
|
||||
(xLedFeedbackCtl *) & stuff[1]);
|
||||
return Success;
|
||||
}
|
||||
break;
|
||||
case BellFeedbackClass:
|
||||
if (len != (sizeof(xBellFeedbackCtl) >> 2)) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
||||
0, BadLength);
|
||||
return Success;
|
||||
}
|
||||
for (b = dev->bell; b; b = b->next)
|
||||
if (b->ctrl.id == ((xBellFeedbackCtl *) & stuff[1])->id) {
|
||||
ChangeBellFeedback(client, dev, stuff->mask, b,
|
||||
(xBellFeedbackCtl *) & stuff[1]);
|
||||
return Success;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, BadMatch);
|
||||
return Success;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* This procedure changes KbdFeedbackClass data.
|
||||
*
|
||||
*/
|
||||
|
||||
int
|
||||
static int
|
||||
ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||
KbdFeedbackPtr k, xKbdFeedbackCtl * f)
|
||||
{
|
||||
|
@ -351,7 +227,7 @@ ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
|||
*
|
||||
*/
|
||||
|
||||
int
|
||||
static int
|
||||
ChangePtrFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||
PtrFeedbackPtr p, xPtrFeedbackCtl * f)
|
||||
{
|
||||
|
@ -422,7 +298,7 @@ ChangePtrFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
|||
*
|
||||
*/
|
||||
|
||||
int
|
||||
static int
|
||||
ChangeIntegerFeedback(ClientPtr client, DeviceIntPtr dev,
|
||||
long unsigned int mask, IntegerFeedbackPtr i,
|
||||
xIntegerFeedbackCtl * f)
|
||||
|
@ -445,7 +321,7 @@ ChangeIntegerFeedback(ClientPtr client, DeviceIntPtr dev,
|
|||
*
|
||||
*/
|
||||
|
||||
int
|
||||
static int
|
||||
ChangeStringFeedback(ClientPtr client, DeviceIntPtr dev,
|
||||
long unsigned int mask, StringFeedbackPtr s,
|
||||
xStringFeedbackCtl * f)
|
||||
|
@ -495,7 +371,7 @@ ChangeStringFeedback(ClientPtr client, DeviceIntPtr dev,
|
|||
*
|
||||
*/
|
||||
|
||||
int
|
||||
static int
|
||||
ChangeBellFeedback(ClientPtr client, DeviceIntPtr dev,
|
||||
long unsigned int mask, BellFeedbackPtr b,
|
||||
xBellFeedbackCtl * f)
|
||||
|
@ -560,7 +436,7 @@ ChangeBellFeedback(ClientPtr client, DeviceIntPtr dev,
|
|||
*
|
||||
*/
|
||||
|
||||
int
|
||||
static int
|
||||
ChangeLedFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||
LedFeedbackPtr l, xLedFeedbackCtl * f)
|
||||
{
|
||||
|
@ -585,3 +461,128 @@ ChangeLedFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
|||
|
||||
return Success;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Change the control attributes.
|
||||
*
|
||||
*/
|
||||
|
||||
int
|
||||
ProcXChangeFeedbackControl(ClientPtr client)
|
||||
{
|
||||
unsigned len;
|
||||
DeviceIntPtr dev;
|
||||
KbdFeedbackPtr k;
|
||||
PtrFeedbackPtr p;
|
||||
IntegerFeedbackPtr i;
|
||||
StringFeedbackPtr s;
|
||||
BellFeedbackPtr b;
|
||||
LedFeedbackPtr l;
|
||||
|
||||
REQUEST(xChangeFeedbackControlReq);
|
||||
REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
|
||||
|
||||
len = stuff->length - (sizeof(xChangeFeedbackControlReq) >> 2);
|
||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||
if (dev == NULL) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
||||
BadDevice);
|
||||
return Success;
|
||||
}
|
||||
|
||||
switch (stuff->feedbackid) {
|
||||
case KbdFeedbackClass:
|
||||
if (len != (sizeof(xKbdFeedbackCtl) >> 2)) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
||||
0, BadLength);
|
||||
return Success;
|
||||
}
|
||||
for (k = dev->kbdfeed; k; k = k->next)
|
||||
if (k->ctrl.id == ((xKbdFeedbackCtl *) & stuff[1])->id) {
|
||||
ChangeKbdFeedback(client, dev, stuff->mask, k,
|
||||
(xKbdFeedbackCtl *) & stuff[1]);
|
||||
return Success;
|
||||
}
|
||||
break;
|
||||
case PtrFeedbackClass:
|
||||
if (len != (sizeof(xPtrFeedbackCtl) >> 2)) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
||||
0, BadLength);
|
||||
return Success;
|
||||
}
|
||||
for (p = dev->ptrfeed; p; p = p->next)
|
||||
if (p->ctrl.id == ((xPtrFeedbackCtl *) & stuff[1])->id) {
|
||||
ChangePtrFeedback(client, dev, stuff->mask, p,
|
||||
(xPtrFeedbackCtl *) & stuff[1]);
|
||||
return Success;
|
||||
}
|
||||
break;
|
||||
case StringFeedbackClass:
|
||||
{
|
||||
register char n;
|
||||
xStringFeedbackCtl *f = ((xStringFeedbackCtl *) & stuff[1]);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&f->num_keysyms, n);
|
||||
}
|
||||
if (len != ((sizeof(xStringFeedbackCtl) >> 2) + f->num_keysyms)) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
||||
0, BadLength);
|
||||
return Success;
|
||||
}
|
||||
for (s = dev->stringfeed; s; s = s->next)
|
||||
if (s->ctrl.id == ((xStringFeedbackCtl *) & stuff[1])->id) {
|
||||
ChangeStringFeedback(client, dev, stuff->mask, s,
|
||||
(xStringFeedbackCtl *) & stuff[1]);
|
||||
return Success;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IntegerFeedbackClass:
|
||||
if (len != (sizeof(xIntegerFeedbackCtl) >> 2)) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
||||
0, BadLength);
|
||||
return Success;
|
||||
}
|
||||
for (i = dev->intfeed; i; i = i->next)
|
||||
if (i->ctrl.id == ((xIntegerFeedbackCtl *) & stuff[1])->id) {
|
||||
ChangeIntegerFeedback(client, dev, stuff->mask, i,
|
||||
(xIntegerFeedbackCtl *) & stuff[1]);
|
||||
return Success;
|
||||
}
|
||||
break;
|
||||
case LedFeedbackClass:
|
||||
if (len != (sizeof(xLedFeedbackCtl) >> 2)) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
||||
0, BadLength);
|
||||
return Success;
|
||||
}
|
||||
for (l = dev->leds; l; l = l->next)
|
||||
if (l->ctrl.id == ((xLedFeedbackCtl *) & stuff[1])->id) {
|
||||
ChangeLedFeedback(client, dev, stuff->mask, l,
|
||||
(xLedFeedbackCtl *) & stuff[1]);
|
||||
return Success;
|
||||
}
|
||||
break;
|
||||
case BellFeedbackClass:
|
||||
if (len != (sizeof(xBellFeedbackCtl) >> 2)) {
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
||||
0, BadLength);
|
||||
return Success;
|
||||
}
|
||||
for (b = dev->bell; b; b = b->next)
|
||||
if (b->ctrl.id == ((xBellFeedbackCtl *) & stuff[1])->id) {
|
||||
ChangeBellFeedback(client, dev, stuff->mask, b,
|
||||
(xBellFeedbackCtl *) & stuff[1]);
|
||||
return Success;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, BadMatch);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
|
42
Xi/chgfctl.h
42
Xi/chgfctl.h
|
@ -36,46 +36,4 @@ int SProcXChangeFeedbackControl(ClientPtr /* client */
|
|||
int ProcXChangeFeedbackControl(ClientPtr /* client */
|
||||
);
|
||||
|
||||
int ChangeKbdFeedback(ClientPtr /* client */ ,
|
||||
DeviceIntPtr /* dev */ ,
|
||||
unsigned long /* mask */ ,
|
||||
KbdFeedbackPtr /* k */ ,
|
||||
xKbdFeedbackCtl * /* f */
|
||||
);
|
||||
|
||||
int ChangePtrFeedback(ClientPtr /* client */ ,
|
||||
DeviceIntPtr /* dev */ ,
|
||||
unsigned long /* mask */ ,
|
||||
PtrFeedbackPtr /* p */ ,
|
||||
xPtrFeedbackCtl * /* f */
|
||||
);
|
||||
|
||||
int ChangeIntegerFeedback(ClientPtr /* client */ ,
|
||||
DeviceIntPtr /* dev */ ,
|
||||
unsigned long /* mask */ ,
|
||||
IntegerFeedbackPtr /* i */ ,
|
||||
xIntegerFeedbackCtl * /* f */
|
||||
);
|
||||
|
||||
int ChangeStringFeedback(ClientPtr /* client */ ,
|
||||
DeviceIntPtr /* dev */ ,
|
||||
unsigned long /* mask */ ,
|
||||
StringFeedbackPtr /* s */ ,
|
||||
xStringFeedbackCtl * /* f */
|
||||
);
|
||||
|
||||
int ChangeBellFeedback(ClientPtr /* client */ ,
|
||||
DeviceIntPtr /* dev */ ,
|
||||
unsigned long /* mask */ ,
|
||||
BellFeedbackPtr /* b */ ,
|
||||
xBellFeedbackCtl * /* f */
|
||||
);
|
||||
|
||||
int ChangeLedFeedback(ClientPtr /* client */ ,
|
||||
DeviceIntPtr /* dev */ ,
|
||||
unsigned long /* mask */ ,
|
||||
LedFeedbackPtr /* l */ ,
|
||||
xLedFeedbackCtl * /* f */
|
||||
);
|
||||
|
||||
#endif /* CHGFCTL_H */
|
||||
|
|
|
@ -45,12 +45,4 @@ void SendEventToAllWindows(DeviceIntPtr /* dev */ ,
|
|||
int /* count */
|
||||
);
|
||||
|
||||
void FindInterestedChildren( /* FIXME: could be static? */
|
||||
DeviceIntPtr /* dev */ ,
|
||||
WindowPtr /* p1 */ ,
|
||||
Mask /* mask */ ,
|
||||
xEvent * /* ev */ ,
|
||||
int /* count */
|
||||
);
|
||||
|
||||
#endif /* CHGPTR_H */
|
||||
|
|
|
@ -87,6 +87,53 @@ SProcXCloseDevice(register ClientPtr client)
|
|||
return (ProcXCloseDevice(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Clear out event selections and passive grabs from a window for the
|
||||
* specified device.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client)
|
||||
{
|
||||
InputClientsPtr others;
|
||||
OtherInputMasks *pOthers;
|
||||
GrabPtr grab, next;
|
||||
|
||||
if ((pOthers = wOtherInputMasks(pWin)) != 0)
|
||||
for (others = pOthers->inputClients; others; others = others->next)
|
||||
if (SameClient(others, client))
|
||||
others->mask[dev->id] = NoEventMask;
|
||||
|
||||
for (grab = wPassiveGrabs(pWin); grab; grab = next) {
|
||||
next = grab->next;
|
||||
if ((grab->device == dev) &&
|
||||
(client->clientAsMask == CLIENT_BITS(grab->resource)))
|
||||
FreeResource(grab->resource, RT_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Walk througth the window tree, deleting event selections for this client
|
||||
* from this device from all windows.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client)
|
||||
{
|
||||
WindowPtr p2;
|
||||
|
||||
while (p1) {
|
||||
p2 = p1->firstChild;
|
||||
DeleteDeviceEvents(dev, p1, client);
|
||||
DeleteEventsFromChildren(dev, p2, client);
|
||||
p1 = p1->nextSib;
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure closes an input device.
|
||||
|
@ -126,50 +173,3 @@ ProcXCloseDevice(register ClientPtr client)
|
|||
CloseInputDevice(d, client);
|
||||
return Success;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Walk througth the window tree, deleting event selections for this client
|
||||
* from this device from all windows.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client)
|
||||
{
|
||||
WindowPtr p2;
|
||||
|
||||
while (p1) {
|
||||
p2 = p1->firstChild;
|
||||
DeleteDeviceEvents(dev, p1, client);
|
||||
DeleteEventsFromChildren(dev, p2, client);
|
||||
p1 = p1->nextSib;
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Clear out event selections and passive grabs from a window for the
|
||||
* specified device.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client)
|
||||
{
|
||||
InputClientsPtr others;
|
||||
OtherInputMasks *pOthers;
|
||||
GrabPtr grab, next;
|
||||
|
||||
if ((pOthers = wOtherInputMasks(pWin)) != 0)
|
||||
for (others = pOthers->inputClients; others; others = others->next)
|
||||
if (SameClient(others, client))
|
||||
others->mask[dev->id] = NoEventMask;
|
||||
|
||||
for (grab = wPassiveGrabs(pWin); grab; grab = next) {
|
||||
next = grab->next;
|
||||
if ((grab->device == dev) &&
|
||||
(client->clientAsMask == CLIENT_BITS(grab->resource)))
|
||||
FreeResource(grab->resource, RT_NONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,14 +36,4 @@ int SProcXCloseDevice(ClientPtr /* client */
|
|||
int ProcXCloseDevice(ClientPtr /* client */
|
||||
);
|
||||
|
||||
void DeleteEventsFromChildren(DeviceIntPtr /* dev */ ,
|
||||
WindowPtr /* p1 */ ,
|
||||
ClientPtr /* client */
|
||||
);
|
||||
|
||||
void DeleteDeviceEvents(DeviceIntPtr /* dev */ ,
|
||||
WindowPtr /* pWin */ ,
|
||||
ClientPtr /* client */
|
||||
);
|
||||
|
||||
#endif /* CLOSEDEV_H */
|
||||
|
|
|
@ -994,33 +994,7 @@ ChangeKeyMapping(ClientPtr client,
|
|||
return client->noClientException;
|
||||
}
|
||||
|
||||
void
|
||||
DeleteWindowFromAnyExtEvents(WindowPtr pWin, Bool freeResources)
|
||||
{
|
||||
int i;
|
||||
DeviceIntPtr dev;
|
||||
InputClientsPtr ic;
|
||||
struct _OtherInputMasks *inputMasks;
|
||||
|
||||
for (dev = inputInfo.devices; dev; dev = dev->next) {
|
||||
if (dev == inputInfo.pointer || dev == inputInfo.keyboard)
|
||||
continue;
|
||||
DeleteDeviceFromAnyExtEvents(pWin, dev);
|
||||
}
|
||||
|
||||
for (dev = inputInfo.off_devices; dev; dev = dev->next)
|
||||
DeleteDeviceFromAnyExtEvents(pWin, dev);
|
||||
|
||||
if (freeResources)
|
||||
while ((inputMasks = wOtherInputMasks(pWin)) != 0) {
|
||||
ic = inputMasks->inputClients;
|
||||
for (i = 0; i < EMASKSIZE; i++)
|
||||
inputMasks->dontPropagateMask[i] = 0;
|
||||
FreeResource(ic->resource, RT_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev)
|
||||
{
|
||||
WindowPtr parent;
|
||||
|
@ -1085,6 +1059,32 @@ DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev)
|
|||
dev->valuator->motionHintWindow = NullWindow;
|
||||
}
|
||||
|
||||
void
|
||||
DeleteWindowFromAnyExtEvents(WindowPtr pWin, Bool freeResources)
|
||||
{
|
||||
int i;
|
||||
DeviceIntPtr dev;
|
||||
InputClientsPtr ic;
|
||||
struct _OtherInputMasks *inputMasks;
|
||||
|
||||
for (dev = inputInfo.devices; dev; dev = dev->next) {
|
||||
if (dev == inputInfo.pointer || dev == inputInfo.keyboard)
|
||||
continue;
|
||||
DeleteDeviceFromAnyExtEvents(pWin, dev);
|
||||
}
|
||||
|
||||
for (dev = inputInfo.off_devices; dev; dev = dev->next)
|
||||
DeleteDeviceFromAnyExtEvents(pWin, dev);
|
||||
|
||||
if (freeResources)
|
||||
while ((inputMasks = wOtherInputMasks(pWin)) != 0) {
|
||||
ic = inputMasks->inputClients;
|
||||
for (i = 0; i < EMASKSIZE; i++)
|
||||
inputMasks->dontPropagateMask[i] = 0;
|
||||
FreeResource(ic->resource, RT_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * pEvents, Mask mask)
|
||||
{
|
||||
|
@ -1138,7 +1138,7 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type,
|
|||
}
|
||||
}
|
||||
|
||||
Mask
|
||||
static Mask
|
||||
DeviceEventMaskForClient(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client)
|
||||
{
|
||||
register InputClientsPtr other;
|
||||
|
@ -1223,7 +1223,7 @@ ShouldFreeInputMasks(WindowPtr pWin, Bool ignoreSelectedEvents)
|
|||
*
|
||||
*/
|
||||
|
||||
void
|
||||
static void
|
||||
FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask,
|
||||
xEvent * ev, int count)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
extern int IReqCode;
|
||||
extern int BadDevice;
|
||||
extern int BadEvent;
|
||||
extern int BadMode;
|
||||
extern int DeviceBusy;
|
||||
extern int BadClass;
|
||||
|
@ -46,7 +45,6 @@ extern Mask DevicePointerMotionMask;
|
|||
extern Mask DevicePointerMotionHintMask;
|
||||
extern Mask DeviceFocusChangeMask;
|
||||
extern Mask DeviceStateNotifyMask;
|
||||
extern Mask ChangeDeviceNotifyMask;
|
||||
extern Mask DeviceMappingNotifyMask;
|
||||
extern Mask DeviceOwnerGrabButtonMask;
|
||||
extern Mask DeviceButtonGrabMask;
|
||||
|
|
386
Xi/extinit.c
386
Xi/extinit.c
|
@ -116,7 +116,7 @@ int ExtEventIndex;
|
|||
Mask ExtValidMasks[EMASKSIZE];
|
||||
Mask ExtExclusiveMasks[EMASKSIZE];
|
||||
|
||||
struct dev_type
|
||||
static struct dev_type
|
||||
{
|
||||
Atom type;
|
||||
char *name;
|
||||
|
@ -152,7 +152,7 @@ XExtEventInfo EventInfo[32];
|
|||
|
||||
int IReqCode = 0;
|
||||
int BadDevice = 0;
|
||||
int BadEvent = 1;
|
||||
static int BadEvent = 1;
|
||||
int BadMode = 2;
|
||||
int DeviceBusy = 3;
|
||||
int BadClass = 4;
|
||||
|
@ -161,7 +161,7 @@ Mask DevicePointerMotionMask;
|
|||
Mask DevicePointerMotionHintMask;
|
||||
Mask DeviceFocusChangeMask;
|
||||
Mask DeviceStateNotifyMask;
|
||||
Mask ChangeDeviceNotifyMask;
|
||||
static Mask ChangeDeviceNotifyMask;
|
||||
Mask DeviceMappingNotifyMask;
|
||||
Mask DeviceOwnerGrabButtonMask;
|
||||
Mask DeviceButtonGrabMask;
|
||||
|
@ -208,51 +208,6 @@ static XExtensionVersion thisversion = { XI_Present,
|
|||
XI_Add_DevicePresenceNotify_Minor
|
||||
};
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* IExtensionInit - initialize the input extension.
|
||||
*
|
||||
* Called from InitExtensions in main() or from QueryExtension() if the
|
||||
* extension is dynamically loaded.
|
||||
*
|
||||
* This extension has several events and errors.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
XInputExtensionInit(void)
|
||||
{
|
||||
ExtensionEntry *extEntry;
|
||||
|
||||
extEntry = AddExtension(INAME, IEVENTS, IERRORS, ProcIDispatch,
|
||||
SProcIDispatch, IResetProc, StandardMinorOpcode);
|
||||
if (extEntry) {
|
||||
IReqCode = extEntry->base;
|
||||
AllExtensionVersions[IReqCode - 128] = thisversion;
|
||||
MakeDeviceTypeAtoms();
|
||||
RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone);
|
||||
FixExtensionEvents(extEntry);
|
||||
ReplySwapVector[IReqCode] = (ReplySwapPtr) SReplyIDispatch;
|
||||
EventSwapVector[DeviceValuator] = SEventIDispatch;
|
||||
EventSwapVector[DeviceKeyPress] = SEventIDispatch;
|
||||
EventSwapVector[DeviceKeyRelease] = SEventIDispatch;
|
||||
EventSwapVector[DeviceButtonPress] = SEventIDispatch;
|
||||
EventSwapVector[DeviceButtonRelease] = SEventIDispatch;
|
||||
EventSwapVector[DeviceMotionNotify] = SEventIDispatch;
|
||||
EventSwapVector[DeviceFocusIn] = SEventIDispatch;
|
||||
EventSwapVector[DeviceFocusOut] = SEventIDispatch;
|
||||
EventSwapVector[ProximityIn] = SEventIDispatch;
|
||||
EventSwapVector[ProximityOut] = SEventIDispatch;
|
||||
EventSwapVector[DeviceStateNotify] = SEventIDispatch;
|
||||
EventSwapVector[DeviceKeyStateNotify] = SEventIDispatch;
|
||||
EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch;
|
||||
EventSwapVector[DeviceMappingNotify] = SEventIDispatch;
|
||||
EventSwapVector[ChangeDeviceNotify] = SEventIDispatch;
|
||||
} else {
|
||||
FatalError("IExtensionInit: AddExtensions failed\n");
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* ProcIDispatch - main dispatch routine for requests to this extension.
|
||||
|
@ -260,7 +215,7 @@ XInputExtensionInit(void)
|
|||
*
|
||||
*/
|
||||
|
||||
int
|
||||
static int
|
||||
ProcIDispatch(register ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
|
@ -349,7 +304,7 @@ ProcIDispatch(register ClientPtr client)
|
|||
*
|
||||
*/
|
||||
|
||||
int
|
||||
static int
|
||||
SProcIDispatch(register ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
|
@ -441,7 +396,7 @@ SProcIDispatch(register ClientPtr client)
|
|||
if (rep->RepType == X_##code) \
|
||||
SRepX##code (client, len, (x##code##Reply *) rep)
|
||||
|
||||
void
|
||||
static void
|
||||
SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
|
||||
/* All we look at is the type field */
|
||||
{ /* This is common to all replies */
|
||||
|
@ -500,68 +455,13 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* SEventIDispatch
|
||||
*
|
||||
* Swap any events defined in this extension.
|
||||
*/
|
||||
#define DO_SWAP(func,type) func ((type *)from, (type *)to)
|
||||
|
||||
void
|
||||
SEventIDispatch(xEvent * from, xEvent * to)
|
||||
{
|
||||
int type = from->u.u.type & 0177;
|
||||
|
||||
if (type == DeviceValuator)
|
||||
DO_SWAP(SEventDeviceValuator, deviceValuator);
|
||||
else if (type == DeviceKeyPress) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == DeviceKeyRelease) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == DeviceButtonPress) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == DeviceButtonRelease) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == DeviceMotionNotify) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == DeviceFocusIn)
|
||||
DO_SWAP(SEventFocus, deviceFocus);
|
||||
else if (type == DeviceFocusOut)
|
||||
DO_SWAP(SEventFocus, deviceFocus);
|
||||
else if (type == ProximityIn) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == ProximityOut) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == DeviceStateNotify)
|
||||
DO_SWAP(SDeviceStateNotifyEvent, deviceStateNotify);
|
||||
else if (type == DeviceKeyStateNotify)
|
||||
DO_SWAP(SDeviceKeyStateNotifyEvent, deviceKeyStateNotify);
|
||||
else if (type == DeviceButtonStateNotify)
|
||||
DO_SWAP(SDeviceButtonStateNotifyEvent, deviceButtonStateNotify);
|
||||
else if (type == DeviceMappingNotify)
|
||||
DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify);
|
||||
else if (type == ChangeDeviceNotify)
|
||||
DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify);
|
||||
else {
|
||||
FatalError("XInputExtension: Impossible event!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* This function swaps the DeviceValuator event.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
static void
|
||||
SEventDeviceValuator(deviceValuator * from, deviceValuator * to)
|
||||
{
|
||||
register char n;
|
||||
|
@ -577,7 +477,7 @@ SEventDeviceValuator(deviceValuator * from, deviceValuator * to)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SEventFocus(deviceFocus * from, deviceFocus * to)
|
||||
{
|
||||
register char n;
|
||||
|
@ -588,7 +488,7 @@ SEventFocus(deviceFocus * from, deviceFocus * to)
|
|||
swapl(&to->window, n);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SDeviceStateNotifyEvent(deviceStateNotify * from, deviceStateNotify * to)
|
||||
{
|
||||
register int i;
|
||||
|
@ -604,7 +504,7 @@ SDeviceStateNotifyEvent(deviceStateNotify * from, deviceStateNotify * to)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SDeviceKeyStateNotifyEvent(deviceKeyStateNotify * from,
|
||||
deviceKeyStateNotify * to)
|
||||
{
|
||||
|
@ -614,7 +514,7 @@ SDeviceKeyStateNotifyEvent(deviceKeyStateNotify * from,
|
|||
swaps(&to->sequenceNumber, n);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SDeviceButtonStateNotifyEvent(deviceButtonStateNotify * from,
|
||||
deviceButtonStateNotify * to)
|
||||
{
|
||||
|
@ -624,7 +524,7 @@ SDeviceButtonStateNotifyEvent(deviceButtonStateNotify * from,
|
|||
swaps(&to->sequenceNumber, n);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SChangeDeviceNotifyEvent(changeDeviceNotify * from, changeDeviceNotify * to)
|
||||
{
|
||||
register char n;
|
||||
|
@ -634,7 +534,7 @@ SChangeDeviceNotifyEvent(changeDeviceNotify * from, changeDeviceNotify * to)
|
|||
swapl(&to->time, n);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SDeviceMappingNotifyEvent(deviceMappingNotify * from, deviceMappingNotify * to)
|
||||
{
|
||||
register char n;
|
||||
|
@ -644,7 +544,7 @@ SDeviceMappingNotifyEvent(deviceMappingNotify * from, deviceMappingNotify * to)
|
|||
swapl(&to->time, n);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to)
|
||||
{
|
||||
register char n;
|
||||
|
@ -655,13 +555,106 @@ SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to
|
|||
swaps(&to->control, n);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Allow the specified event to have its propagation suppressed.
|
||||
* The default is to not allow suppression of propagation.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
AllowPropagateSuppress(Mask mask)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_DEVICES; i++)
|
||||
PropagateMask[i] |= mask;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Return the next available extension event mask.
|
||||
*
|
||||
*/
|
||||
|
||||
static Mask
|
||||
GetNextExtEventMask(void)
|
||||
{
|
||||
int i;
|
||||
Mask mask = lastExtEventMask;
|
||||
|
||||
if (lastExtEventMask == 0) {
|
||||
FatalError("GetNextExtEventMask: no more events are available.");
|
||||
}
|
||||
lastExtEventMask <<= 1;
|
||||
|
||||
for (i = 0; i < MAX_DEVICES; i++)
|
||||
ExtValidMasks[i] |= mask;
|
||||
return mask;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Record an event mask where there is no unique corresponding event type.
|
||||
* We can't call SetMaskForEvent, since that would clobber the existing
|
||||
* mask for that event. MotionHint and ButtonMotion are examples.
|
||||
*
|
||||
* Since extension event types will never be less than 64, we can use
|
||||
* 0-63 in the EventInfo array as the "type" to be used to look up this
|
||||
* mask. This means that the corresponding macros such as
|
||||
* DevicePointerMotionHint must have access to the same constants.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
SetEventInfo(Mask mask, int constant)
|
||||
{
|
||||
EventInfo[ExtEventIndex].mask = mask;
|
||||
EventInfo[ExtEventIndex++].type = constant;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Allow the specified event to be restricted to being selected by one
|
||||
* client at a time.
|
||||
* The default is to allow more than one client to select the event.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
SetExclusiveAccess(Mask mask)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_DEVICES; i++)
|
||||
ExtExclusiveMasks[i] |= mask;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Assign the specified mask to the specified event.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
SetMaskForExtEvent(Mask mask, int event)
|
||||
{
|
||||
|
||||
EventInfo[ExtEventIndex].mask = mask;
|
||||
EventInfo[ExtEventIndex++].type = event;
|
||||
|
||||
if ((event < LASTEvent) || (event >= 128))
|
||||
FatalError("MaskForExtensionEvent: bogus event number");
|
||||
SetMaskForEvent(mask, event);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* This function sets up extension event types and masks.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
static void
|
||||
FixExtensionEvents(ExtensionEntry * extEntry)
|
||||
{
|
||||
Mask mask;
|
||||
|
@ -767,7 +760,7 @@ FixExtensionEvents(ExtensionEntry * extEntry)
|
|||
*
|
||||
*/
|
||||
|
||||
void
|
||||
static void
|
||||
RestoreExtensionEvents(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -815,7 +808,7 @@ RestoreExtensionEvents(void)
|
|||
*
|
||||
*/
|
||||
|
||||
void
|
||||
static void
|
||||
IResetProc(ExtensionEntry * unused)
|
||||
{
|
||||
|
||||
|
@ -859,7 +852,7 @@ AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name)
|
|||
*
|
||||
*/
|
||||
|
||||
void
|
||||
static void
|
||||
MakeDeviceTypeAtoms(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -892,95 +885,102 @@ LookupDeviceIntRec(CARD8 id)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Allow the specified event to be restricted to being selected by one
|
||||
* client at a time.
|
||||
* The default is to allow more than one client to select the event.
|
||||
* SEventIDispatch
|
||||
*
|
||||
* Swap any events defined in this extension.
|
||||
*/
|
||||
#define DO_SWAP(func,type) func ((type *)from, (type *)to)
|
||||
|
||||
void
|
||||
SetExclusiveAccess(Mask mask)
|
||||
static void
|
||||
SEventIDispatch(xEvent * from, xEvent * to)
|
||||
{
|
||||
int i;
|
||||
int type = from->u.u.type & 0177;
|
||||
|
||||
for (i = 0; i < MAX_DEVICES; i++)
|
||||
ExtExclusiveMasks[i] |= mask;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Allow the specified event to have its propagation suppressed.
|
||||
* The default is to not allow suppression of propagation.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
AllowPropagateSuppress(Mask mask)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_DEVICES; i++)
|
||||
PropagateMask[i] |= mask;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Return the next available extension event mask.
|
||||
*
|
||||
*/
|
||||
|
||||
Mask
|
||||
GetNextExtEventMask(void)
|
||||
{
|
||||
int i;
|
||||
Mask mask = lastExtEventMask;
|
||||
|
||||
if (lastExtEventMask == 0) {
|
||||
FatalError("GetNextExtEventMask: no more events are available.");
|
||||
if (type == DeviceValuator)
|
||||
DO_SWAP(SEventDeviceValuator, deviceValuator);
|
||||
else if (type == DeviceKeyPress) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == DeviceKeyRelease) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == DeviceButtonPress) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == DeviceButtonRelease) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == DeviceMotionNotify) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == DeviceFocusIn)
|
||||
DO_SWAP(SEventFocus, deviceFocus);
|
||||
else if (type == DeviceFocusOut)
|
||||
DO_SWAP(SEventFocus, deviceFocus);
|
||||
else if (type == ProximityIn) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == ProximityOut) {
|
||||
SKeyButtonPtrEvent(from, to);
|
||||
to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1;
|
||||
} else if (type == DeviceStateNotify)
|
||||
DO_SWAP(SDeviceStateNotifyEvent, deviceStateNotify);
|
||||
else if (type == DeviceKeyStateNotify)
|
||||
DO_SWAP(SDeviceKeyStateNotifyEvent, deviceKeyStateNotify);
|
||||
else if (type == DeviceButtonStateNotify)
|
||||
DO_SWAP(SDeviceButtonStateNotifyEvent, deviceButtonStateNotify);
|
||||
else if (type == DeviceMappingNotify)
|
||||
DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify);
|
||||
else if (type == ChangeDeviceNotify)
|
||||
DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify);
|
||||
else {
|
||||
FatalError("XInputExtension: Impossible event!\n");
|
||||
}
|
||||
lastExtEventMask <<= 1;
|
||||
|
||||
for (i = 0; i < MAX_DEVICES; i++)
|
||||
ExtValidMasks[i] |= mask;
|
||||
return mask;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
/**********************************************************************
|
||||
*
|
||||
* Assign the specified mask to the specified event.
|
||||
* IExtensionInit - initialize the input extension.
|
||||
*
|
||||
* Called from InitExtensions in main() or from QueryExtension() if the
|
||||
* extension is dynamically loaded.
|
||||
*
|
||||
* This extension has several events and errors.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
SetMaskForExtEvent(Mask mask, int event)
|
||||
XInputExtensionInit(void)
|
||||
{
|
||||
ExtensionEntry *extEntry;
|
||||
|
||||
EventInfo[ExtEventIndex].mask = mask;
|
||||
EventInfo[ExtEventIndex++].type = event;
|
||||
|
||||
if ((event < LASTEvent) || (event >= 128))
|
||||
FatalError("MaskForExtensionEvent: bogus event number");
|
||||
SetMaskForEvent(mask, event);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Record an event mask where there is no unique corresponding event type.
|
||||
* We can't call SetMaskForEvent, since that would clobber the existing
|
||||
* mask for that event. MotionHint and ButtonMotion are examples.
|
||||
*
|
||||
* Since extension event types will never be less than 64, we can use
|
||||
* 0-63 in the EventInfo array as the "type" to be used to look up this
|
||||
* mask. This means that the corresponding macros such as
|
||||
* DevicePointerMotionHint must have access to the same constants.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
SetEventInfo(Mask mask, int constant)
|
||||
{
|
||||
EventInfo[ExtEventIndex].mask = mask;
|
||||
EventInfo[ExtEventIndex++].type = constant;
|
||||
extEntry = AddExtension(INAME, IEVENTS, IERRORS, ProcIDispatch,
|
||||
SProcIDispatch, IResetProc, StandardMinorOpcode);
|
||||
if (extEntry) {
|
||||
IReqCode = extEntry->base;
|
||||
AllExtensionVersions[IReqCode - 128] = thisversion;
|
||||
MakeDeviceTypeAtoms();
|
||||
RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone);
|
||||
FixExtensionEvents(extEntry);
|
||||
ReplySwapVector[IReqCode] = (ReplySwapPtr) SReplyIDispatch;
|
||||
EventSwapVector[DeviceValuator] = SEventIDispatch;
|
||||
EventSwapVector[DeviceKeyPress] = SEventIDispatch;
|
||||
EventSwapVector[DeviceKeyRelease] = SEventIDispatch;
|
||||
EventSwapVector[DeviceButtonPress] = SEventIDispatch;
|
||||
EventSwapVector[DeviceButtonRelease] = SEventIDispatch;
|
||||
EventSwapVector[DeviceMotionNotify] = SEventIDispatch;
|
||||
EventSwapVector[DeviceFocusIn] = SEventIDispatch;
|
||||
EventSwapVector[DeviceFocusOut] = SEventIDispatch;
|
||||
EventSwapVector[ProximityIn] = SEventIDispatch;
|
||||
EventSwapVector[ProximityOut] = SEventIDispatch;
|
||||
EventSwapVector[DeviceStateNotify] = SEventIDispatch;
|
||||
EventSwapVector[DeviceKeyStateNotify] = SEventIDispatch;
|
||||
EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch;
|
||||
EventSwapVector[DeviceMappingNotify] = SEventIDispatch;
|
||||
EventSwapVector[ChangeDeviceNotify] = SEventIDispatch;
|
||||
} else {
|
||||
FatalError("IExtensionInit: AddExtensions failed\n");
|
||||
}
|
||||
}
|
||||
|
|
293
Xi/getdctl.c
293
Xi/getdctl.c
|
@ -86,6 +86,152 @@ SProcXGetDeviceControl(register ClientPtr client)
|
|||
return (ProcXGetDeviceControl(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies DeviceResolution data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
CopySwapDeviceResolution(ClientPtr client, ValuatorClassPtr v, char *buf,
|
||||
int length)
|
||||
{
|
||||
register char n;
|
||||
AxisInfoPtr a;
|
||||
xDeviceResolutionState *r;
|
||||
int i, *iptr;
|
||||
|
||||
r = (xDeviceResolutionState *) buf;
|
||||
r->control = DEVICE_RESOLUTION;
|
||||
r->length = length;
|
||||
r->num_valuators = v->numAxes;
|
||||
buf += sizeof(xDeviceResolutionState);
|
||||
iptr = (int *)buf;
|
||||
for (i = 0, a = v->axes; i < v->numAxes; i++, a++)
|
||||
*iptr++ = a->resolution;
|
||||
for (i = 0, a = v->axes; i < v->numAxes; i++, a++)
|
||||
*iptr++ = a->min_resolution;
|
||||
for (i = 0, a = v->axes; i < v->numAxes; i++, a++)
|
||||
*iptr++ = a->max_resolution;
|
||||
if (client->swapped) {
|
||||
swaps(&r->control, n);
|
||||
swaps(&r->length, n);
|
||||
swapl(&r->num_valuators, n);
|
||||
iptr = (int *)buf;
|
||||
for (i = 0; i < (3 * v->numAxes); i++, iptr++) {
|
||||
swapl(iptr, n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void CopySwapDeviceAbsCalib (ClientPtr client, AbsoluteClassPtr dts,
|
||||
char *buf)
|
||||
{
|
||||
register char n;
|
||||
xDeviceAbsCalibState *calib = (xDeviceAbsCalibState *) buf;
|
||||
|
||||
calib->control = DEVICE_ABS_CALIB;
|
||||
calib->length = sizeof(calib);
|
||||
calib->min_x = dts->min_x;
|
||||
calib->max_x = dts->max_x;
|
||||
calib->min_y = dts->min_y;
|
||||
calib->max_y = dts->max_y;
|
||||
calib->flip_x = dts->flip_x;
|
||||
calib->flip_y = dts->flip_y;
|
||||
calib->rotation = dts->rotation;
|
||||
calib->button_threshold = dts->button_threshold;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&calib->control, n);
|
||||
swaps(&calib->length, n);
|
||||
swapl(&calib->min_x, n);
|
||||
swapl(&calib->max_x, n);
|
||||
swapl(&calib->min_y, n);
|
||||
swapl(&calib->max_y, n);
|
||||
swapl(&calib->flip_x, n);
|
||||
swapl(&calib->flip_y, n);
|
||||
swapl(&calib->rotation, n);
|
||||
swapl(&calib->button_threshold, n);
|
||||
}
|
||||
}
|
||||
|
||||
static void CopySwapDeviceAbsArea (ClientPtr client, AbsoluteClassPtr dts,
|
||||
char *buf)
|
||||
{
|
||||
register char n;
|
||||
xDeviceAbsAreaState *area = (xDeviceAbsAreaState *) buf;
|
||||
|
||||
area->control = DEVICE_ABS_AREA;
|
||||
area->length = sizeof(area);
|
||||
area->offset_x = dts->offset_x;
|
||||
area->offset_y = dts->offset_y;
|
||||
area->width = dts->width;
|
||||
area->height = dts->height;
|
||||
area->screen = dts->screen;
|
||||
area->following = dts->following;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&area->control, n);
|
||||
swaps(&area->length, n);
|
||||
swapl(&area->offset_x, n);
|
||||
swapl(&area->offset_y, n);
|
||||
swapl(&area->width, n);
|
||||
swapl(&area->height, n);
|
||||
swapl(&area->screen, n);
|
||||
swapl(&area->following, n);
|
||||
}
|
||||
}
|
||||
|
||||
static void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf)
|
||||
{
|
||||
register char n;
|
||||
xDeviceCoreState *c = (xDeviceCoreState *) buf;
|
||||
|
||||
c->control = DEVICE_CORE;
|
||||
c->length = sizeof(c);
|
||||
c->status = dev->coreEvents;
|
||||
c->iscore = (dev == inputInfo.keyboard || dev == inputInfo.pointer);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&c->control, n);
|
||||
swaps(&c->length, n);
|
||||
swaps(&c->status, n);
|
||||
}
|
||||
}
|
||||
|
||||
static void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf)
|
||||
{
|
||||
register char n;
|
||||
xDeviceEnableState *e = (xDeviceEnableState *) buf;
|
||||
|
||||
e->control = DEVICE_ENABLE;
|
||||
e->length = sizeof(e);
|
||||
e->enable = dev->enabled;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&e->control, n);
|
||||
swaps(&e->length, n);
|
||||
swaps(&e->enable, n);
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure writes the reply for the xGetDeviceControl function,
|
||||
* if the client and server have a different byte ordering.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
SRepXGetDeviceControl(ClientPtr client, int size, xGetDeviceControlReply * rep)
|
||||
{
|
||||
register char n;
|
||||
|
||||
swaps(&rep->sequenceNumber, n);
|
||||
swapl(&rep->length, n);
|
||||
WriteToClient(client, size, (char *)rep);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Get the state of the specified device control.
|
||||
|
@ -186,150 +332,3 @@ ProcXGetDeviceControl(ClientPtr client)
|
|||
xfree(savbuf);
|
||||
return Success;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies DeviceResolution data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
CopySwapDeviceResolution(ClientPtr client, ValuatorClassPtr v, char *buf,
|
||||
int length)
|
||||
{
|
||||
register char n;
|
||||
AxisInfoPtr a;
|
||||
xDeviceResolutionState *r;
|
||||
int i, *iptr;
|
||||
|
||||
r = (xDeviceResolutionState *) buf;
|
||||
r->control = DEVICE_RESOLUTION;
|
||||
r->length = length;
|
||||
r->num_valuators = v->numAxes;
|
||||
buf += sizeof(xDeviceResolutionState);
|
||||
iptr = (int *)buf;
|
||||
for (i = 0, a = v->axes; i < v->numAxes; i++, a++)
|
||||
*iptr++ = a->resolution;
|
||||
for (i = 0, a = v->axes; i < v->numAxes; i++, a++)
|
||||
*iptr++ = a->min_resolution;
|
||||
for (i = 0, a = v->axes; i < v->numAxes; i++, a++)
|
||||
*iptr++ = a->max_resolution;
|
||||
if (client->swapped) {
|
||||
swaps(&r->control, n);
|
||||
swaps(&r->length, n);
|
||||
swapl(&r->num_valuators, n);
|
||||
iptr = (int *)buf;
|
||||
for (i = 0; i < (3 * v->numAxes); i++, iptr++) {
|
||||
swapl(iptr, n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CopySwapDeviceAbsCalib (ClientPtr client, AbsoluteClassPtr dts,
|
||||
char *buf)
|
||||
{
|
||||
register char n;
|
||||
xDeviceAbsCalibState *calib = (xDeviceAbsCalibState *) buf;
|
||||
|
||||
calib->control = DEVICE_ABS_CALIB;
|
||||
calib->length = sizeof(calib);
|
||||
calib->min_x = dts->min_x;
|
||||
calib->max_x = dts->max_x;
|
||||
calib->min_y = dts->min_y;
|
||||
calib->max_y = dts->max_y;
|
||||
calib->flip_x = dts->flip_x;
|
||||
calib->flip_y = dts->flip_y;
|
||||
calib->rotation = dts->rotation;
|
||||
calib->button_threshold = dts->button_threshold;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&calib->control, n);
|
||||
swaps(&calib->length, n);
|
||||
swapl(&calib->min_x, n);
|
||||
swapl(&calib->max_x, n);
|
||||
swapl(&calib->min_y, n);
|
||||
swapl(&calib->max_y, n);
|
||||
swapl(&calib->flip_x, n);
|
||||
swapl(&calib->flip_y, n);
|
||||
swapl(&calib->rotation, n);
|
||||
swapl(&calib->button_threshold, n);
|
||||
}
|
||||
}
|
||||
|
||||
void CopySwapDeviceAbsArea (ClientPtr client, AbsoluteClassPtr dts,
|
||||
char *buf)
|
||||
{
|
||||
register char n;
|
||||
xDeviceAbsAreaState *area = (xDeviceAbsAreaState *) buf;
|
||||
|
||||
area->control = DEVICE_ABS_AREA;
|
||||
area->length = sizeof(area);
|
||||
area->offset_x = dts->offset_x;
|
||||
area->offset_y = dts->offset_y;
|
||||
area->width = dts->width;
|
||||
area->height = dts->height;
|
||||
area->screen = dts->screen;
|
||||
area->following = dts->following;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&area->control, n);
|
||||
swaps(&area->length, n);
|
||||
swapl(&area->offset_x, n);
|
||||
swapl(&area->offset_y, n);
|
||||
swapl(&area->width, n);
|
||||
swapl(&area->height, n);
|
||||
swapl(&area->screen, n);
|
||||
swapl(&area->following, n);
|
||||
}
|
||||
}
|
||||
|
||||
void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf)
|
||||
{
|
||||
register char n;
|
||||
xDeviceCoreState *c = (xDeviceCoreState *) buf;
|
||||
|
||||
c->control = DEVICE_CORE;
|
||||
c->length = sizeof(c);
|
||||
c->status = dev->coreEvents;
|
||||
c->iscore = (dev == inputInfo.keyboard || dev == inputInfo.pointer);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&c->control, n);
|
||||
swaps(&c->length, n);
|
||||
swaps(&c->status, n);
|
||||
}
|
||||
}
|
||||
|
||||
void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf)
|
||||
{
|
||||
register char n;
|
||||
xDeviceEnableState *e = (xDeviceEnableState *) buf;
|
||||
|
||||
e->control = DEVICE_ENABLE;
|
||||
e->length = sizeof(e);
|
||||
e->enable = dev->enabled;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&e->control, n);
|
||||
swaps(&e->length, n);
|
||||
swaps(&e->enable, n);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure writes the reply for the xGetDeviceControl function,
|
||||
* if the client and server have a different byte ordering.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
SRepXGetDeviceControl(ClientPtr client, int size, xGetDeviceControlReply * rep)
|
||||
{
|
||||
register char n;
|
||||
|
||||
swaps(&rep->sequenceNumber, n);
|
||||
swapl(&rep->length, n);
|
||||
WriteToClient(client, size, (char *)rep);
|
||||
}
|
||||
|
|
24
Xi/getdctl.h
24
Xi/getdctl.h
|
@ -36,30 +36,6 @@ int SProcXGetDeviceControl(ClientPtr /* client */
|
|||
int ProcXGetDeviceControl(ClientPtr /* client */
|
||||
);
|
||||
|
||||
void CopySwapDeviceResolution(ClientPtr /* client */ ,
|
||||
ValuatorClassPtr /* v */ ,
|
||||
char * /* buf */ ,
|
||||
int /* length */
|
||||
);
|
||||
|
||||
void CopySwapDeviceAbsCalib (ClientPtr client,
|
||||
AbsoluteClassPtr dts,
|
||||
char *buf);
|
||||
|
||||
void CopySwapDeviceAbsArea (ClientPtr client,
|
||||
AbsoluteClassPtr dts,
|
||||
char *buf);
|
||||
|
||||
void CopySwapDeviceCore(ClientPtr /* client */ ,
|
||||
DeviceIntPtr /* dev */ ,
|
||||
char * /* buf */
|
||||
);
|
||||
|
||||
void CopySwapDeviceEnable(ClientPtr /* client */ ,
|
||||
DeviceIntPtr /* dev */ ,
|
||||
char * /* buf */
|
||||
);
|
||||
|
||||
void SRepXGetDeviceControl(ClientPtr /* client */ ,
|
||||
int /* size */ ,
|
||||
xGetDeviceControlReply * /* rep */
|
||||
|
|
400
Xi/getfctl.c
400
Xi/getfctl.c
|
@ -84,6 +84,206 @@ SProcXGetFeedbackControl(register ClientPtr client)
|
|||
return (ProcXGetFeedbackControl(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies KbdFeedbackClass data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf)
|
||||
{
|
||||
int i;
|
||||
register char n;
|
||||
xKbdFeedbackState *k2;
|
||||
|
||||
k2 = (xKbdFeedbackState *) * buf;
|
||||
k2->class = KbdFeedbackClass;
|
||||
k2->length = sizeof(xKbdFeedbackState);
|
||||
k2->id = k->ctrl.id;
|
||||
k2->click = k->ctrl.click;
|
||||
k2->percent = k->ctrl.bell;
|
||||
k2->pitch = k->ctrl.bell_pitch;
|
||||
k2->duration = k->ctrl.bell_duration;
|
||||
k2->led_mask = k->ctrl.leds;
|
||||
k2->global_auto_repeat = k->ctrl.autoRepeat;
|
||||
for (i = 0; i < 32; i++)
|
||||
k2->auto_repeats[i] = k->ctrl.autoRepeats[i];
|
||||
if (client->swapped) {
|
||||
swaps(&k2->length, n);
|
||||
swaps(&k2->pitch, n);
|
||||
swaps(&k2->duration, n);
|
||||
swapl(&k2->led_mask, n);
|
||||
swapl(&k2->led_values, n);
|
||||
}
|
||||
*buf += sizeof(xKbdFeedbackState);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies PtrFeedbackClass data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf)
|
||||
{
|
||||
register char n;
|
||||
xPtrFeedbackState *p2;
|
||||
|
||||
p2 = (xPtrFeedbackState *) * buf;
|
||||
p2->class = PtrFeedbackClass;
|
||||
p2->length = sizeof(xPtrFeedbackState);
|
||||
p2->id = p->ctrl.id;
|
||||
p2->accelNum = p->ctrl.num;
|
||||
p2->accelDenom = p->ctrl.den;
|
||||
p2->threshold = p->ctrl.threshold;
|
||||
if (client->swapped) {
|
||||
swaps(&p2->length, n);
|
||||
swaps(&p2->accelNum, n);
|
||||
swaps(&p2->accelDenom, n);
|
||||
swaps(&p2->threshold, n);
|
||||
}
|
||||
*buf += sizeof(xPtrFeedbackState);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies IntegerFeedbackClass data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
CopySwapIntegerFeedback(ClientPtr client, IntegerFeedbackPtr i, char **buf)
|
||||
{
|
||||
register char n;
|
||||
xIntegerFeedbackState *i2;
|
||||
|
||||
i2 = (xIntegerFeedbackState *) * buf;
|
||||
i2->class = IntegerFeedbackClass;
|
||||
i2->length = sizeof(xIntegerFeedbackState);
|
||||
i2->id = i->ctrl.id;
|
||||
i2->resolution = i->ctrl.resolution;
|
||||
i2->min_value = i->ctrl.min_value;
|
||||
i2->max_value = i->ctrl.max_value;
|
||||
if (client->swapped) {
|
||||
swaps(&i2->length, n);
|
||||
swapl(&i2->resolution, n);
|
||||
swapl(&i2->min_value, n);
|
||||
swapl(&i2->max_value, n);
|
||||
}
|
||||
*buf += sizeof(xIntegerFeedbackState);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies StringFeedbackClass data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf)
|
||||
{
|
||||
int i;
|
||||
register char n;
|
||||
xStringFeedbackState *s2;
|
||||
KeySym *kptr;
|
||||
|
||||
s2 = (xStringFeedbackState *) * buf;
|
||||
s2->class = StringFeedbackClass;
|
||||
s2->length = sizeof(xStringFeedbackState) +
|
||||
s->ctrl.num_symbols_supported * sizeof(KeySym);
|
||||
s2->id = s->ctrl.id;
|
||||
s2->max_symbols = s->ctrl.max_symbols;
|
||||
s2->num_syms_supported = s->ctrl.num_symbols_supported;
|
||||
*buf += sizeof(xStringFeedbackState);
|
||||
kptr = (KeySym *) (*buf);
|
||||
for (i = 0; i < s->ctrl.num_symbols_supported; i++)
|
||||
*kptr++ = *(s->ctrl.symbols_supported + i);
|
||||
if (client->swapped) {
|
||||
swaps(&s2->length, n);
|
||||
swaps(&s2->max_symbols, n);
|
||||
swaps(&s2->num_syms_supported, n);
|
||||
kptr = (KeySym *) (*buf);
|
||||
for (i = 0; i < s->ctrl.num_symbols_supported; i++, kptr++) {
|
||||
swapl(kptr, n);
|
||||
}
|
||||
}
|
||||
*buf += (s->ctrl.num_symbols_supported * sizeof(KeySym));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies LedFeedbackClass data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf)
|
||||
{
|
||||
register char n;
|
||||
xLedFeedbackState *l2;
|
||||
|
||||
l2 = (xLedFeedbackState *) * buf;
|
||||
l2->class = LedFeedbackClass;
|
||||
l2->length = sizeof(xLedFeedbackState);
|
||||
l2->id = l->ctrl.id;
|
||||
l2->led_values = l->ctrl.led_values;
|
||||
l2->led_mask = l->ctrl.led_mask;
|
||||
if (client->swapped) {
|
||||
swaps(&l2->length, n);
|
||||
swapl(&l2->led_values, n);
|
||||
swapl(&l2->led_mask, n);
|
||||
}
|
||||
*buf += sizeof(xLedFeedbackState);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies BellFeedbackClass data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf)
|
||||
{
|
||||
register char n;
|
||||
xBellFeedbackState *b2;
|
||||
|
||||
b2 = (xBellFeedbackState *) * buf;
|
||||
b2->class = BellFeedbackClass;
|
||||
b2->length = sizeof(xBellFeedbackState);
|
||||
b2->id = b->ctrl.id;
|
||||
b2->percent = b->ctrl.percent;
|
||||
b2->pitch = b->ctrl.pitch;
|
||||
b2->duration = b->ctrl.duration;
|
||||
if (client->swapped) {
|
||||
swaps(&b2->length, n);
|
||||
swaps(&b2->pitch, n);
|
||||
swaps(&b2->duration, n);
|
||||
}
|
||||
*buf += sizeof(xBellFeedbackState);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure writes the reply for the xGetFeedbackControl function,
|
||||
* if the client and server have a different byte ordering.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
SRepXGetFeedbackControl(ClientPtr client, int size,
|
||||
xGetFeedbackControlReply * rep)
|
||||
{
|
||||
register char n;
|
||||
|
||||
swaps(&rep->sequenceNumber, n);
|
||||
swapl(&rep->length, n);
|
||||
swaps(&rep->num_feedbacks, n);
|
||||
WriteToClient(client, size, (char *)rep);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Get the feedback control state.
|
||||
|
@ -176,203 +376,3 @@ ProcXGetFeedbackControl(ClientPtr client)
|
|||
xfree(savbuf);
|
||||
return Success;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies KbdFeedbackClass data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf)
|
||||
{
|
||||
int i;
|
||||
register char n;
|
||||
xKbdFeedbackState *k2;
|
||||
|
||||
k2 = (xKbdFeedbackState *) * buf;
|
||||
k2->class = KbdFeedbackClass;
|
||||
k2->length = sizeof(xKbdFeedbackState);
|
||||
k2->id = k->ctrl.id;
|
||||
k2->click = k->ctrl.click;
|
||||
k2->percent = k->ctrl.bell;
|
||||
k2->pitch = k->ctrl.bell_pitch;
|
||||
k2->duration = k->ctrl.bell_duration;
|
||||
k2->led_mask = k->ctrl.leds;
|
||||
k2->global_auto_repeat = k->ctrl.autoRepeat;
|
||||
for (i = 0; i < 32; i++)
|
||||
k2->auto_repeats[i] = k->ctrl.autoRepeats[i];
|
||||
if (client->swapped) {
|
||||
swaps(&k2->length, n);
|
||||
swaps(&k2->pitch, n);
|
||||
swaps(&k2->duration, n);
|
||||
swapl(&k2->led_mask, n);
|
||||
swapl(&k2->led_values, n);
|
||||
}
|
||||
*buf += sizeof(xKbdFeedbackState);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies PtrFeedbackClass data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf)
|
||||
{
|
||||
register char n;
|
||||
xPtrFeedbackState *p2;
|
||||
|
||||
p2 = (xPtrFeedbackState *) * buf;
|
||||
p2->class = PtrFeedbackClass;
|
||||
p2->length = sizeof(xPtrFeedbackState);
|
||||
p2->id = p->ctrl.id;
|
||||
p2->accelNum = p->ctrl.num;
|
||||
p2->accelDenom = p->ctrl.den;
|
||||
p2->threshold = p->ctrl.threshold;
|
||||
if (client->swapped) {
|
||||
swaps(&p2->length, n);
|
||||
swaps(&p2->accelNum, n);
|
||||
swaps(&p2->accelDenom, n);
|
||||
swaps(&p2->threshold, n);
|
||||
}
|
||||
*buf += sizeof(xPtrFeedbackState);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies IntegerFeedbackClass data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
CopySwapIntegerFeedback(ClientPtr client, IntegerFeedbackPtr i, char **buf)
|
||||
{
|
||||
register char n;
|
||||
xIntegerFeedbackState *i2;
|
||||
|
||||
i2 = (xIntegerFeedbackState *) * buf;
|
||||
i2->class = IntegerFeedbackClass;
|
||||
i2->length = sizeof(xIntegerFeedbackState);
|
||||
i2->id = i->ctrl.id;
|
||||
i2->resolution = i->ctrl.resolution;
|
||||
i2->min_value = i->ctrl.min_value;
|
||||
i2->max_value = i->ctrl.max_value;
|
||||
if (client->swapped) {
|
||||
swaps(&i2->length, n);
|
||||
swapl(&i2->resolution, n);
|
||||
swapl(&i2->min_value, n);
|
||||
swapl(&i2->max_value, n);
|
||||
}
|
||||
*buf += sizeof(xIntegerFeedbackState);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies StringFeedbackClass data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf)
|
||||
{
|
||||
int i;
|
||||
register char n;
|
||||
xStringFeedbackState *s2;
|
||||
KeySym *kptr;
|
||||
|
||||
s2 = (xStringFeedbackState *) * buf;
|
||||
s2->class = StringFeedbackClass;
|
||||
s2->length = sizeof(xStringFeedbackState) +
|
||||
s->ctrl.num_symbols_supported * sizeof(KeySym);
|
||||
s2->id = s->ctrl.id;
|
||||
s2->max_symbols = s->ctrl.max_symbols;
|
||||
s2->num_syms_supported = s->ctrl.num_symbols_supported;
|
||||
*buf += sizeof(xStringFeedbackState);
|
||||
kptr = (KeySym *) (*buf);
|
||||
for (i = 0; i < s->ctrl.num_symbols_supported; i++)
|
||||
*kptr++ = *(s->ctrl.symbols_supported + i);
|
||||
if (client->swapped) {
|
||||
swaps(&s2->length, n);
|
||||
swaps(&s2->max_symbols, n);
|
||||
swaps(&s2->num_syms_supported, n);
|
||||
kptr = (KeySym *) (*buf);
|
||||
for (i = 0; i < s->ctrl.num_symbols_supported; i++, kptr++) {
|
||||
swapl(kptr, n);
|
||||
}
|
||||
}
|
||||
*buf += (s->ctrl.num_symbols_supported * sizeof(KeySym));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies LedFeedbackClass data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf)
|
||||
{
|
||||
register char n;
|
||||
xLedFeedbackState *l2;
|
||||
|
||||
l2 = (xLedFeedbackState *) * buf;
|
||||
l2->class = LedFeedbackClass;
|
||||
l2->length = sizeof(xLedFeedbackState);
|
||||
l2->id = l->ctrl.id;
|
||||
l2->led_values = l->ctrl.led_values;
|
||||
l2->led_mask = l->ctrl.led_mask;
|
||||
if (client->swapped) {
|
||||
swaps(&l2->length, n);
|
||||
swapl(&l2->led_values, n);
|
||||
swapl(&l2->led_mask, n);
|
||||
}
|
||||
*buf += sizeof(xLedFeedbackState);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies BellFeedbackClass data, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf)
|
||||
{
|
||||
register char n;
|
||||
xBellFeedbackState *b2;
|
||||
|
||||
b2 = (xBellFeedbackState *) * buf;
|
||||
b2->class = BellFeedbackClass;
|
||||
b2->length = sizeof(xBellFeedbackState);
|
||||
b2->id = b->ctrl.id;
|
||||
b2->percent = b->ctrl.percent;
|
||||
b2->pitch = b->ctrl.pitch;
|
||||
b2->duration = b->ctrl.duration;
|
||||
if (client->swapped) {
|
||||
swaps(&b2->length, n);
|
||||
swaps(&b2->pitch, n);
|
||||
swaps(&b2->duration, n);
|
||||
}
|
||||
*buf += sizeof(xBellFeedbackState);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure writes the reply for the xGetFeedbackControl function,
|
||||
* if the client and server have a different byte ordering.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
SRepXGetFeedbackControl(ClientPtr client, int size,
|
||||
xGetFeedbackControlReply * rep)
|
||||
{
|
||||
register char n;
|
||||
|
||||
swaps(&rep->sequenceNumber, n);
|
||||
swapl(&rep->length, n);
|
||||
swaps(&rep->num_feedbacks, n);
|
||||
WriteToClient(client, size, (char *)rep);
|
||||
}
|
||||
|
|
30
Xi/getfctl.h
30
Xi/getfctl.h
|
@ -36,36 +36,6 @@ int SProcXGetFeedbackControl(ClientPtr /* client */
|
|||
int ProcXGetFeedbackControl(ClientPtr /* client */
|
||||
);
|
||||
|
||||
void CopySwapKbdFeedback(ClientPtr /* client */ ,
|
||||
KbdFeedbackPtr /* k */ ,
|
||||
char ** /* buf */
|
||||
);
|
||||
|
||||
void CopySwapPtrFeedback(ClientPtr /* client */ ,
|
||||
PtrFeedbackPtr /* p */ ,
|
||||
char ** /* buf */
|
||||
);
|
||||
|
||||
void CopySwapIntegerFeedback(ClientPtr /* client */ ,
|
||||
IntegerFeedbackPtr /* i */ ,
|
||||
char ** /* buf */
|
||||
);
|
||||
|
||||
void CopySwapStringFeedback(ClientPtr /* client */ ,
|
||||
StringFeedbackPtr /* s */ ,
|
||||
char ** /* buf */
|
||||
);
|
||||
|
||||
void CopySwapLedFeedback(ClientPtr /* client */ ,
|
||||
LedFeedbackPtr /* l */ ,
|
||||
char ** /* buf */
|
||||
);
|
||||
|
||||
void CopySwapBellFeedback(ClientPtr /* client */ ,
|
||||
BellFeedbackPtr /* b */ ,
|
||||
char ** /* buf */
|
||||
);
|
||||
|
||||
void SRepXGetFeedbackControl(ClientPtr /* client */ ,
|
||||
int /* size */ ,
|
||||
xGetFeedbackControlReply * /* rep */
|
||||
|
|
424
Xi/listdev.c
424
Xi/listdev.c
|
@ -86,6 +86,218 @@ SProcXListInputDevices(register ClientPtr client)
|
|||
return (ProcXListInputDevices(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure calculates the size of the information to be returned
|
||||
* for an input device.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
SizeDeviceInfo(DeviceIntPtr d, int *namesize, int *size)
|
||||
{
|
||||
int chunks;
|
||||
|
||||
*namesize += 1;
|
||||
if (d->name)
|
||||
*namesize += strlen(d->name);
|
||||
if (d->key != NULL)
|
||||
*size += sizeof(xKeyInfo);
|
||||
if (d->button != NULL)
|
||||
*size += sizeof(xButtonInfo);
|
||||
if (d->valuator != NULL) {
|
||||
chunks = ((int)d->valuator->numAxes + 19) / VPC;
|
||||
*size += (chunks * sizeof(xValuatorInfo) +
|
||||
d->valuator->numAxes * sizeof(xAxisInfo));
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies data to the DeviceInfo struct, swapping if necessary.
|
||||
*
|
||||
* We need the extra byte in the allocated buffer, because the trailing null
|
||||
* hammers one extra byte, which is overwritten by the next name except for
|
||||
* the last name copied.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
CopyDeviceName(char **namebuf, char *name)
|
||||
{
|
||||
char *nameptr = (char *)*namebuf;
|
||||
|
||||
if (name) {
|
||||
*nameptr++ = strlen(name);
|
||||
strcpy(nameptr, name);
|
||||
*namebuf += (strlen(name) + 1);
|
||||
} else {
|
||||
*nameptr++ = 0;
|
||||
*namebuf += 1;
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies ButtonClass information, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
CopySwapButtonClass(register ClientPtr client, ButtonClassPtr b, char **buf)
|
||||
{
|
||||
register char n;
|
||||
xButtonInfoPtr b2;
|
||||
|
||||
b2 = (xButtonInfoPtr) * buf;
|
||||
b2->class = ButtonClass;
|
||||
b2->length = sizeof(xButtonInfo);
|
||||
b2->num_buttons = b->numButtons;
|
||||
if (client->swapped) {
|
||||
swaps(&b2->num_buttons, n); /* macro - braces are required */
|
||||
}
|
||||
*buf += sizeof(xButtonInfo);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies data to the DeviceInfo struct, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
CopySwapDevice(register ClientPtr client, DeviceIntPtr d, int num_classes,
|
||||
char **buf)
|
||||
{
|
||||
register char n;
|
||||
xDeviceInfoPtr dev;
|
||||
|
||||
dev = (xDeviceInfoPtr) * buf;
|
||||
|
||||
dev->id = d->id;
|
||||
dev->type = d->type;
|
||||
dev->num_classes = num_classes;
|
||||
if (d == inputInfo.keyboard)
|
||||
dev->use = IsXKeyboard;
|
||||
else if (d == inputInfo.pointer)
|
||||
dev->use = IsXPointer;
|
||||
else if (d->key && d->kbdfeed)
|
||||
dev->use = IsXExtensionKeyboard;
|
||||
else if (d->valuator && d->button)
|
||||
dev->use = IsXExtensionPointer;
|
||||
else
|
||||
dev->use = IsXExtensionDevice;
|
||||
if (client->swapped) {
|
||||
swapl(&dev->type, n); /* macro - braces are required */
|
||||
}
|
||||
*buf += sizeof(xDeviceInfo);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies KeyClass information, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
CopySwapKeyClass(register ClientPtr client, KeyClassPtr k, char **buf)
|
||||
{
|
||||
register char n;
|
||||
xKeyInfoPtr k2;
|
||||
|
||||
k2 = (xKeyInfoPtr) * buf;
|
||||
k2->class = KeyClass;
|
||||
k2->length = sizeof(xKeyInfo);
|
||||
k2->min_keycode = k->curKeySyms.minKeyCode;
|
||||
k2->max_keycode = k->curKeySyms.maxKeyCode;
|
||||
k2->num_keys = k2->max_keycode - k2->min_keycode + 1;
|
||||
if (client->swapped) {
|
||||
swaps(&k2->num_keys, n);
|
||||
}
|
||||
*buf += sizeof(xKeyInfo);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies ValuatorClass information, swapping if necessary.
|
||||
*
|
||||
* Devices may have up to 255 valuators. The length of a ValuatorClass is
|
||||
* defined to be sizeof(ValuatorClassInfo) + num_axes * sizeof (xAxisInfo).
|
||||
* The maximum length is therefore (8 + 255 * 12) = 3068. However, the
|
||||
* length field is one byte. If a device has more than 20 valuators, we
|
||||
* must therefore return multiple valuator classes to the client.
|
||||
*
|
||||
*/
|
||||
|
||||
static int
|
||||
CopySwapValuatorClass(register ClientPtr client, ValuatorClassPtr v, char **buf)
|
||||
{
|
||||
int i, j, axes, t_axes;
|
||||
register char n;
|
||||
xValuatorInfoPtr v2;
|
||||
AxisInfo *a;
|
||||
xAxisInfoPtr a2;
|
||||
|
||||
for (i = 0, axes = v->numAxes; i < ((v->numAxes + 19) / VPC);
|
||||
i++, axes -= VPC) {
|
||||
t_axes = axes < VPC ? axes : VPC;
|
||||
if (t_axes < 0)
|
||||
t_axes = v->numAxes % VPC;
|
||||
v2 = (xValuatorInfoPtr) * buf;
|
||||
v2->class = ValuatorClass;
|
||||
v2->length = sizeof(xValuatorInfo) + t_axes * sizeof(xAxisInfo);
|
||||
v2->num_axes = t_axes;
|
||||
v2->mode = v->mode & DeviceMode;
|
||||
v2->motion_buffer_size = v->numMotionEvents;
|
||||
if (client->swapped) {
|
||||
swapl(&v2->motion_buffer_size, n);
|
||||
}
|
||||
*buf += sizeof(xValuatorInfo);
|
||||
a = v->axes + (VPC * i);
|
||||
a2 = (xAxisInfoPtr) * buf;
|
||||
for (j = 0; j < t_axes; j++) {
|
||||
a2->min_value = a->min_value;
|
||||
a2->max_value = a->max_value;
|
||||
a2->resolution = a->resolution;
|
||||
if (client->swapped) {
|
||||
swapl(&a2->min_value, n);
|
||||
swapl(&a2->max_value, n);
|
||||
swapl(&a2->resolution, n);
|
||||
}
|
||||
a2++;
|
||||
a++;
|
||||
*buf += sizeof(xAxisInfo);
|
||||
}
|
||||
}
|
||||
return (i);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure lists information to be returned for an input device.
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
ListDeviceInfo(ClientPtr client, DeviceIntPtr d, xDeviceInfoPtr dev,
|
||||
char **devbuf, char **classbuf, char **namebuf)
|
||||
{
|
||||
CopyDeviceName(namebuf, d->name);
|
||||
CopySwapDevice(client, d, 0, devbuf);
|
||||
if (d->key != NULL) {
|
||||
CopySwapKeyClass(client, d->key, classbuf);
|
||||
dev->num_classes++;
|
||||
}
|
||||
if (d->button != NULL) {
|
||||
CopySwapButtonClass(client, d->button, classbuf);
|
||||
dev->num_classes++;
|
||||
}
|
||||
if (d->valuator != NULL) {
|
||||
dev->num_classes +=
|
||||
CopySwapValuatorClass(client, d->valuator, classbuf);
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure lists the input devices available to the server.
|
||||
|
@ -145,218 +357,6 @@ ProcXListInputDevices(register ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure calculates the size of the information to be returned
|
||||
* for an input device.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
SizeDeviceInfo(DeviceIntPtr d, int *namesize, int *size)
|
||||
{
|
||||
int chunks;
|
||||
|
||||
*namesize += 1;
|
||||
if (d->name)
|
||||
*namesize += strlen(d->name);
|
||||
if (d->key != NULL)
|
||||
*size += sizeof(xKeyInfo);
|
||||
if (d->button != NULL)
|
||||
*size += sizeof(xButtonInfo);
|
||||
if (d->valuator != NULL) {
|
||||
chunks = ((int)d->valuator->numAxes + 19) / VPC;
|
||||
*size += (chunks * sizeof(xValuatorInfo) +
|
||||
d->valuator->numAxes * sizeof(xAxisInfo));
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure lists information to be returned for an input device.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
ListDeviceInfo(ClientPtr client, DeviceIntPtr d, xDeviceInfoPtr dev,
|
||||
char **devbuf, char **classbuf, char **namebuf)
|
||||
{
|
||||
CopyDeviceName(namebuf, d->name);
|
||||
CopySwapDevice(client, d, 0, devbuf);
|
||||
if (d->key != NULL) {
|
||||
CopySwapKeyClass(client, d->key, classbuf);
|
||||
dev->num_classes++;
|
||||
}
|
||||
if (d->button != NULL) {
|
||||
CopySwapButtonClass(client, d->button, classbuf);
|
||||
dev->num_classes++;
|
||||
}
|
||||
if (d->valuator != NULL) {
|
||||
dev->num_classes +=
|
||||
CopySwapValuatorClass(client, d->valuator, classbuf);
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies data to the DeviceInfo struct, swapping if necessary.
|
||||
*
|
||||
* We need the extra byte in the allocated buffer, because the trailing null
|
||||
* hammers one extra byte, which is overwritten by the next name except for
|
||||
* the last name copied.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
CopyDeviceName(char **namebuf, char *name)
|
||||
{
|
||||
char *nameptr = (char *)*namebuf;
|
||||
|
||||
if (name) {
|
||||
*nameptr++ = strlen(name);
|
||||
strcpy(nameptr, name);
|
||||
*namebuf += (strlen(name) + 1);
|
||||
} else {
|
||||
*nameptr++ = 0;
|
||||
*namebuf += 1;
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies data to the DeviceInfo struct, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
CopySwapDevice(register ClientPtr client, DeviceIntPtr d, int num_classes,
|
||||
char **buf)
|
||||
{
|
||||
register char n;
|
||||
xDeviceInfoPtr dev;
|
||||
|
||||
dev = (xDeviceInfoPtr) * buf;
|
||||
|
||||
dev->id = d->id;
|
||||
dev->type = d->type;
|
||||
dev->num_classes = num_classes;
|
||||
if (d == inputInfo.keyboard)
|
||||
dev->use = IsXKeyboard;
|
||||
else if (d == inputInfo.pointer)
|
||||
dev->use = IsXPointer;
|
||||
else if (d->key && d->kbdfeed)
|
||||
dev->use = IsXExtensionKeyboard;
|
||||
else if (d->valuator && d->button)
|
||||
dev->use = IsXExtensionPointer;
|
||||
else
|
||||
dev->use = IsXExtensionDevice;
|
||||
if (client->swapped) {
|
||||
swapl(&dev->type, n); /* macro - braces are required */
|
||||
}
|
||||
*buf += sizeof(xDeviceInfo);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies KeyClass information, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
CopySwapKeyClass(register ClientPtr client, KeyClassPtr k, char **buf)
|
||||
{
|
||||
register char n;
|
||||
xKeyInfoPtr k2;
|
||||
|
||||
k2 = (xKeyInfoPtr) * buf;
|
||||
k2->class = KeyClass;
|
||||
k2->length = sizeof(xKeyInfo);
|
||||
k2->min_keycode = k->curKeySyms.minKeyCode;
|
||||
k2->max_keycode = k->curKeySyms.maxKeyCode;
|
||||
k2->num_keys = k2->max_keycode - k2->min_keycode + 1;
|
||||
if (client->swapped) {
|
||||
swaps(&k2->num_keys, n);
|
||||
}
|
||||
*buf += sizeof(xKeyInfo);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies ButtonClass information, swapping if necessary.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
CopySwapButtonClass(register ClientPtr client, ButtonClassPtr b, char **buf)
|
||||
{
|
||||
register char n;
|
||||
xButtonInfoPtr b2;
|
||||
|
||||
b2 = (xButtonInfoPtr) * buf;
|
||||
b2->class = ButtonClass;
|
||||
b2->length = sizeof(xButtonInfo);
|
||||
b2->num_buttons = b->numButtons;
|
||||
if (client->swapped) {
|
||||
swaps(&b2->num_buttons, n); /* macro - braces are required */
|
||||
}
|
||||
*buf += sizeof(xButtonInfo);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure copies ValuatorClass information, swapping if necessary.
|
||||
*
|
||||
* Devices may have up to 255 valuators. The length of a ValuatorClass is
|
||||
* defined to be sizeof(ValuatorClassInfo) + num_axes * sizeof (xAxisInfo).
|
||||
* The maximum length is therefore (8 + 255 * 12) = 3068. However, the
|
||||
* length field is one byte. If a device has more than 20 valuators, we
|
||||
* must therefore return multiple valuator classes to the client.
|
||||
*
|
||||
*/
|
||||
|
||||
int
|
||||
CopySwapValuatorClass(register ClientPtr client, ValuatorClassPtr v, char **buf)
|
||||
{
|
||||
int i, j, axes, t_axes;
|
||||
register char n;
|
||||
xValuatorInfoPtr v2;
|
||||
AxisInfo *a;
|
||||
xAxisInfoPtr a2;
|
||||
|
||||
for (i = 0, axes = v->numAxes; i < ((v->numAxes + 19) / VPC);
|
||||
i++, axes -= VPC) {
|
||||
t_axes = axes < VPC ? axes : VPC;
|
||||
if (t_axes < 0)
|
||||
t_axes = v->numAxes % VPC;
|
||||
v2 = (xValuatorInfoPtr) * buf;
|
||||
v2->class = ValuatorClass;
|
||||
v2->length = sizeof(xValuatorInfo) + t_axes * sizeof(xAxisInfo);
|
||||
v2->num_axes = t_axes;
|
||||
v2->mode = v->mode & DeviceMode;
|
||||
v2->motion_buffer_size = v->numMotionEvents;
|
||||
if (client->swapped) {
|
||||
swapl(&v2->motion_buffer_size, n);
|
||||
}
|
||||
*buf += sizeof(xValuatorInfo);
|
||||
a = v->axes + (VPC * i);
|
||||
a2 = (xAxisInfoPtr) * buf;
|
||||
for (j = 0; j < t_axes; j++) {
|
||||
a2->min_value = a->min_value;
|
||||
a2->max_value = a->max_value;
|
||||
a2->resolution = a->resolution;
|
||||
if (client->swapped) {
|
||||
swapl(&a2->min_value, n);
|
||||
swapl(&a2->max_value, n);
|
||||
swapl(&a2->resolution, n);
|
||||
}
|
||||
a2++;
|
||||
a++;
|
||||
*buf += sizeof(xAxisInfo);
|
||||
}
|
||||
}
|
||||
return (i);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure writes the reply for the XListInputDevices function,
|
||||
|
|
38
Xi/listdev.h
38
Xi/listdev.h
|
@ -36,44 +36,6 @@ int SProcXListInputDevices(ClientPtr /* client */
|
|||
int ProcXListInputDevices(ClientPtr /* client */
|
||||
);
|
||||
|
||||
void SizeDeviceInfo(DeviceIntPtr /* d */ ,
|
||||
int * /* namesize */ ,
|
||||
int * /* size */
|
||||
);
|
||||
|
||||
void ListDeviceInfo(ClientPtr /* client */ ,
|
||||
DeviceIntPtr /* d */ ,
|
||||
xDeviceInfoPtr /* dev */ ,
|
||||
char ** /* devbuf */ ,
|
||||
char ** /* classbuf */ ,
|
||||
char ** /* namebuf */
|
||||
);
|
||||
|
||||
void CopyDeviceName(char ** /* namebuf */ ,
|
||||
char * /* name */
|
||||
);
|
||||
|
||||
void CopySwapDevice(ClientPtr /* client */ ,
|
||||
DeviceIntPtr /* d */ ,
|
||||
int /* num_classes */ ,
|
||||
char ** /* buf */
|
||||
);
|
||||
|
||||
void CopySwapKeyClass(ClientPtr /* client */ ,
|
||||
KeyClassPtr /* k */ ,
|
||||
char ** /* buf */
|
||||
);
|
||||
|
||||
void CopySwapButtonClass(ClientPtr /* client */ ,
|
||||
ButtonClassPtr /* b */ ,
|
||||
char ** /* buf */
|
||||
);
|
||||
|
||||
int CopySwapValuatorClass(ClientPtr /* client */ ,
|
||||
ValuatorClassPtr /* v */ ,
|
||||
char ** /* buf */
|
||||
);
|
||||
|
||||
void SRepXListInputDevices(ClientPtr /* client */ ,
|
||||
int /* size */ ,
|
||||
xListInputDevicesReply * /* rep */
|
||||
|
|
124
afb/afb.h
124
afb/afb.h
|
@ -78,27 +78,6 @@ extern void afbDoBitblt(
|
|||
unsigned long /*planemask*/
|
||||
);
|
||||
|
||||
extern RegionPtr afbBitBlt(
|
||||
DrawablePtr /*pSrc*/,
|
||||
DrawablePtr /*pDst*/,
|
||||
GCPtr /*pGC*/,
|
||||
int /*srcx*/,
|
||||
int /*srcy*/,
|
||||
int /*width*/,
|
||||
int /*height*/,
|
||||
int /*dstx*/,
|
||||
int /*dsty*/,
|
||||
void (*doBitBlt)(
|
||||
DrawablePtr /*pSrc*/,
|
||||
DrawablePtr /*pDst*/,
|
||||
int /*alu*/,
|
||||
RegionPtr /*prgnDst*/,
|
||||
DDXPointPtr /*pptSrc*/,
|
||||
unsigned long /*planemask*/
|
||||
),
|
||||
unsigned long /*planemask*/
|
||||
);
|
||||
|
||||
extern RegionPtr afbCopyArea(
|
||||
DrawablePtr /*pSrcDrawable*/,
|
||||
DrawablePtr /*pDstDrawable*/,
|
||||
|
@ -111,27 +90,6 @@ extern RegionPtr afbCopyArea(
|
|||
int /*dsty*/
|
||||
);
|
||||
|
||||
extern RegionPtr afbCopyPlane(
|
||||
DrawablePtr /*pSrcDrawable*/,
|
||||
DrawablePtr /*pDstDrawable*/,
|
||||
GCPtr/*pGC*/,
|
||||
int /*srcx*/,
|
||||
int /*srcy*/,
|
||||
int /*width*/,
|
||||
int /*height*/,
|
||||
int /*dstx*/,
|
||||
int /*dsty*/,
|
||||
unsigned long /*plane*/
|
||||
);
|
||||
|
||||
extern void afbCopy1ToN(
|
||||
DrawablePtr /*pSrc*/,
|
||||
DrawablePtr /*pDst*/,
|
||||
int /*alu*/,
|
||||
RegionPtr /*prgnDst*/,
|
||||
DDXPointPtr /*pptSrc*/,
|
||||
unsigned long /*planemask*/
|
||||
);
|
||||
/* afbbltC.c */
|
||||
|
||||
extern void afbDoBitbltCopy(
|
||||
|
@ -273,23 +231,6 @@ extern Bool afbInitializeColormap(
|
|||
ColormapPtr /*pmap*/
|
||||
);
|
||||
|
||||
extern int afbExpandDirectColors(
|
||||
ColormapPtr /*pmap*/,
|
||||
int /*ndefs*/,
|
||||
xColorItem * /*indefs*/,
|
||||
xColorItem * /*outdefs*/
|
||||
);
|
||||
|
||||
extern Bool afbCreateDefColormap(
|
||||
ScreenPtr /*pScreen*/
|
||||
);
|
||||
|
||||
extern Bool afbSetVisualTypes(
|
||||
int /*depth*/,
|
||||
int /*visuals*/,
|
||||
int /*bitsPerRGB*/
|
||||
);
|
||||
|
||||
extern Bool afbInitVisuals(
|
||||
VisualPtr * /*visualp*/,
|
||||
DepthPtr * /*depthp*/,
|
||||
|
@ -410,16 +351,6 @@ extern Bool afbCreateGC(
|
|||
GCPtr /*pGC*/
|
||||
);
|
||||
|
||||
extern void afbValidateGC(
|
||||
GCPtr /*pGC*/,
|
||||
unsigned long /*changes*/,
|
||||
DrawablePtr /*pDrawable*/
|
||||
);
|
||||
|
||||
extern void afbDestroyGC(
|
||||
GCPtr /*pGC*/
|
||||
);
|
||||
|
||||
extern void afbReduceRop(
|
||||
int /*alu*/,
|
||||
Pixel /*src*/,
|
||||
|
@ -428,19 +359,6 @@ extern void afbReduceRop(
|
|||
unsigned char * /*rrops*/
|
||||
);
|
||||
|
||||
extern void afbReduceOpaqueStipple (
|
||||
Pixel /*fg*/,
|
||||
Pixel /*bg*/,
|
||||
unsigned long /*planemask*/,
|
||||
int /*depth*/,
|
||||
unsigned char * /*rrops*/
|
||||
);
|
||||
|
||||
extern void afbComputeCompositeClip(
|
||||
GCPtr /*pGC*/,
|
||||
DrawablePtr /*pDrawable*/
|
||||
);
|
||||
|
||||
/* afbgetsp.c */
|
||||
|
||||
extern void afbGetSpans(
|
||||
|
@ -588,14 +506,6 @@ extern Bool afbDestroyPixmap(
|
|||
PixmapPtr /*pPixmap*/
|
||||
);
|
||||
|
||||
extern PixmapPtr afbCopyPixmap(
|
||||
PixmapPtr /*pSrc*/
|
||||
);
|
||||
|
||||
extern void afbPadPixmap(
|
||||
PixmapPtr /*pPixmap*/
|
||||
);
|
||||
|
||||
extern void afbXRotatePixmap(
|
||||
PixmapPtr /*pPix*/,
|
||||
int /*rw*/
|
||||
|
@ -637,20 +547,9 @@ extern void afbPushPixels(
|
|||
int /*xOrg*/,
|
||||
int /*yOrg*/
|
||||
);
|
||||
/* afbscrclse.c */
|
||||
|
||||
extern Bool afbCloseScreen(
|
||||
int /*index*/,
|
||||
ScreenPtr /*pScreen*/
|
||||
);
|
||||
/* afbscrinit.c */
|
||||
|
||||
extern Bool afbAllocatePrivates(
|
||||
ScreenPtr /*pScreen*/,
|
||||
int * /*pWinIndex*/,
|
||||
int * /*pGCIndex*/
|
||||
);
|
||||
|
||||
extern Bool afbScreenInit(
|
||||
ScreenPtr /*pScreen*/,
|
||||
pointer /*pbits*/,
|
||||
|
@ -661,15 +560,6 @@ extern Bool afbScreenInit(
|
|||
int /*width*/
|
||||
);
|
||||
|
||||
extern PixmapPtr afbGetWindowPixmap(
|
||||
WindowPtr /*pWin*/
|
||||
);
|
||||
|
||||
extern void afbSetWindowPixmap(
|
||||
WindowPtr /*pWin*/,
|
||||
PixmapPtr /*pPix*/
|
||||
);
|
||||
|
||||
/* afbseg.c */
|
||||
|
||||
extern void afbSegmentSS(
|
||||
|
@ -687,20 +577,6 @@ extern void afbSegmentSD(
|
|||
);
|
||||
/* afbsetsp.c */
|
||||
|
||||
extern void afbSetScanline(
|
||||
int /*y*/,
|
||||
int /*xOrigin*/,
|
||||
int /*xStart*/,
|
||||
int /*xEnd*/,
|
||||
PixelType * /*psrc*/,
|
||||
int /*alu*/,
|
||||
PixelType * /*pdstBase*/,
|
||||
int /*widthDst*/,
|
||||
int /*sizeDst*/,
|
||||
int /*depthDst*/,
|
||||
int /*sizeSrc*/
|
||||
);
|
||||
|
||||
extern void afbSetSpans(
|
||||
DrawablePtr /*pDrawable*/,
|
||||
GCPtr /*pGC*/,
|
||||
|
|
148
afb/afbbitblt.c
148
afb/afbbitblt.c
|
@ -67,9 +67,6 @@ SOFTWARE.
|
|||
#include "afb.h"
|
||||
#include "maskbits.h"
|
||||
|
||||
|
||||
static unsigned char afbRropsOS[AFB_MAX_DEPTH];
|
||||
|
||||
/* CopyArea and CopyPlane for a monchrome frame buffer
|
||||
|
||||
|
||||
|
@ -126,34 +123,7 @@ afbDoBitblt(DrawablePtr pSrc, DrawablePtr pDst, int alu, RegionPtr prgnDst, DDXP
|
|||
typedef void (*afb_blit_func)
|
||||
(DrawablePtr, DrawablePtr, int, RegionPtr, DDXPointPtr, unsigned long);
|
||||
|
||||
RegionPtr
|
||||
afbCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty)
|
||||
{
|
||||
afb_blit_func doBitBlt;
|
||||
|
||||
switch (pGC->alu) {
|
||||
case GXcopy:
|
||||
doBitBlt = afbDoBitbltCopy;
|
||||
break;
|
||||
case GXxor:
|
||||
doBitBlt = afbDoBitbltXor;
|
||||
break;
|
||||
case GXcopyInverted:
|
||||
doBitBlt = afbDoBitbltCopyInverted;
|
||||
break;
|
||||
case GXor:
|
||||
doBitBlt = afbDoBitbltOr;
|
||||
break;
|
||||
default:
|
||||
doBitBlt = afbDoBitbltGeneral;
|
||||
break;
|
||||
}
|
||||
|
||||
return(afbBitBlt(pSrcDrawable, pDstDrawable, pGC, srcx, srcy,
|
||||
width, height, dstx, dsty, doBitBlt, pGC->planemask));
|
||||
}
|
||||
|
||||
RegionPtr
|
||||
static RegionPtr
|
||||
afbBitBlt(register DrawablePtr pSrcDrawable, register DrawablePtr pDstDrawable, register GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, afb_blit_func doBitBlt, long unsigned int planemask)
|
||||
{
|
||||
RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */
|
||||
|
@ -346,102 +316,28 @@ afbBitBlt(register DrawablePtr pSrcDrawable, register DrawablePtr pDstDrawable,
|
|||
}
|
||||
|
||||
RegionPtr
|
||||
afbCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, register GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, long unsigned int plane)
|
||||
afbCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty)
|
||||
{
|
||||
int alu;
|
||||
RegionPtr prgnExposed = NULL;
|
||||
unsigned long old_planemask;
|
||||
afb_blit_func doBitBlt;
|
||||
|
||||
if (pDstDrawable->depth == 1) {
|
||||
old_planemask = pGC->planemask;
|
||||
pGC->planemask = plane;
|
||||
if ((pGC->fgPixel & 1) == 1 && (pGC->bgPixel & 1) == 0) {
|
||||
prgnExposed = (*pGC->ops->CopyArea)(pSrcDrawable, pDstDrawable,
|
||||
pGC, srcx, srcy, width, height, dstx, dsty);
|
||||
} else if ((pGC->fgPixel & 1) == (pGC->bgPixel & 1)) {
|
||||
unsigned char rop;
|
||||
|
||||
afbReduceRop(pGC->alu, pGC->fgPixel, 1, 1, &rop);
|
||||
alu = pGC->alu;
|
||||
pGC->alu = rop;
|
||||
prgnExposed = (*pGC->ops->CopyArea)(pSrcDrawable, pDstDrawable, pGC,
|
||||
srcx, srcy, width, height, dstx,
|
||||
dsty);
|
||||
pGC->alu = alu;
|
||||
} else { /* need to invert the src */
|
||||
alu = pGC->alu;
|
||||
pGC->alu = afbInverseAlu[alu];
|
||||
prgnExposed = (*pGC->ops->CopyArea)(pSrcDrawable, pDstDrawable, pGC,
|
||||
srcx, srcy, width, height, dstx,
|
||||
dsty);
|
||||
pGC->alu = alu;
|
||||
}
|
||||
pGC->planemask = old_planemask;
|
||||
} else {
|
||||
int free_pixmap = FALSE;
|
||||
PixmapPtr pBitmap = (PixmapPtr)pSrcDrawable;
|
||||
ScreenPtr pScreen = pSrcDrawable->pScreen;
|
||||
GCPtr pGC1 = NULL;
|
||||
|
||||
if (pSrcDrawable == pDstDrawable ||
|
||||
pSrcDrawable->type == DRAWABLE_WINDOW || pSrcDrawable->depth != 1) {
|
||||
/* Copy a plane from source drawable to a tmp 1-bit deep pixmap */
|
||||
/* XXX: Range check width and height */
|
||||
pBitmap = (*pScreen->CreatePixmap)(pScreen, width, height, 1);
|
||||
|
||||
if (!pBitmap)
|
||||
return(NULL);
|
||||
pGC1 = GetScratchGC(1, pScreen);
|
||||
if (!pGC1) {
|
||||
(*pScreen->DestroyPixmap)(pBitmap);
|
||||
return(NULL);
|
||||
}
|
||||
ValidateGC((DrawablePtr)pBitmap, pGC1);
|
||||
(void)afbBitBlt(pSrcDrawable, (DrawablePtr)pBitmap, pGC1, srcx, srcy,
|
||||
width, height, 0, 0, afbDoBitbltCopy, plane);
|
||||
free_pixmap = TRUE;
|
||||
}
|
||||
#if 0
|
||||
else {
|
||||
/* XXX: could cope with N-deep pixmap source case without using tmp
|
||||
* src bitmap by setting up a scratch pixmap header and fiddle
|
||||
* around with the pbits pointer.
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
afbReduceOpaqueStipple(pGC->fgPixel, pGC->bgPixel, pGC->planemask,
|
||||
pGC->depth, afbRropsOS);
|
||||
(void)afbBitBlt((DrawablePtr)pBitmap, pDstDrawable, pGC, 0, 0, width,
|
||||
height, dstx, dsty, afbCopy1ToN, pGC->planemask);
|
||||
if (free_pixmap) {
|
||||
(*pScreen->DestroyPixmap)(pBitmap);
|
||||
FreeScratchGC(pGC1);
|
||||
}
|
||||
|
||||
if (pGC->fExpose)
|
||||
prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx,
|
||||
srcy, width, height, dstx, dsty,
|
||||
plane);
|
||||
}
|
||||
return prgnExposed;
|
||||
}
|
||||
|
||||
void
|
||||
afbCopy1ToN(DrawablePtr pSrc, DrawablePtr pDst, int alu, RegionPtr prgnDst, DDXPointPtr pptSrc, long unsigned int planemask)
|
||||
{
|
||||
int numRects = REGION_NUM_RECTS(prgnDst);
|
||||
BoxPtr pbox = REGION_RECTS(prgnDst);
|
||||
int r;
|
||||
|
||||
for (r = 0; r < numRects; r++, pbox++, pptSrc++) {
|
||||
int dx = pptSrc->x;
|
||||
int dy = pptSrc->y;
|
||||
|
||||
if (alu == GXcopy)
|
||||
afbOpaqueStippleAreaCopy(pDst, 1, pbox, alu, (PixmapPtr)pSrc, dx, dy,
|
||||
afbRropsOS, planemask);
|
||||
else
|
||||
afbOpaqueStippleAreaGeneral(pDst, 1, pbox, alu, (PixmapPtr)pSrc, dx,
|
||||
dy, afbRropsOS, planemask);
|
||||
switch (pGC->alu) {
|
||||
case GXcopy:
|
||||
doBitBlt = afbDoBitbltCopy;
|
||||
break;
|
||||
case GXxor:
|
||||
doBitBlt = afbDoBitbltXor;
|
||||
break;
|
||||
case GXcopyInverted:
|
||||
doBitBlt = afbDoBitbltCopyInverted;
|
||||
break;
|
||||
case GXor:
|
||||
doBitBlt = afbDoBitbltOr;
|
||||
break;
|
||||
default:
|
||||
doBitBlt = afbDoBitbltGeneral;
|
||||
break;
|
||||
}
|
||||
|
||||
return(afbBitBlt(pSrcDrawable, pDstDrawable, pGC, srcx, srcy,
|
||||
width, height, dstx, dsty, doBitBlt, pGC->planemask));
|
||||
}
|
||||
|
|
|
@ -70,24 +70,6 @@ afbInitializeColormap(register ColormapPtr pmap)
|
|||
return miInitializeColormap(pmap);
|
||||
}
|
||||
|
||||
int
|
||||
afbExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem *indefs, xColorItem *outdefs)
|
||||
{
|
||||
return miExpandDirectColors(pmap, ndef, indefs, outdefs);
|
||||
}
|
||||
|
||||
Bool
|
||||
afbCreateDefColormap(ScreenPtr pScreen)
|
||||
{
|
||||
return miCreateDefColormap(pScreen);
|
||||
}
|
||||
|
||||
Bool
|
||||
afbSetVisualTypes(int depth, int visuals, int bitsPerRGB)
|
||||
{
|
||||
return miSetVisualTypes(depth, visuals, bitsPerRGB, -1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Given a list of formats for a screen, create a list
|
||||
* of visuals and depths for the screen which correspond to
|
||||
|
|
266
afb/afbgc.c
266
afb/afbgc.c
|
@ -69,6 +69,9 @@ SOFTWARE.
|
|||
|
||||
#include "maskbits.h"
|
||||
|
||||
static void afbDestroyGC(GCPtr);
|
||||
static void afbValidateGC(GCPtr, unsigned long, DrawablePtr);
|
||||
|
||||
static GCFuncs afbFuncs = {
|
||||
afbValidateGC,
|
||||
miChangeGC,
|
||||
|
@ -102,6 +105,33 @@ static GCOps afbGCOps = {
|
|||
afbPushPixels
|
||||
};
|
||||
|
||||
static void
|
||||
afbReduceOpaqueStipple(PixelType fg, PixelType bg, unsigned long planemask,
|
||||
int depth, unsigned char *rop)
|
||||
{
|
||||
register int d;
|
||||
register Pixel mask = 1;
|
||||
|
||||
bg ^= fg;
|
||||
|
||||
for (d = 0; d < depth; d++, mask <<= 1) {
|
||||
if (!(planemask & mask))
|
||||
rop[d] = RROP_NOP;
|
||||
else if (!(bg & mask)) {
|
||||
/* Both fg and bg have a 0 or 1 in this plane */
|
||||
if (fg & mask)
|
||||
rop[d] = RROP_WHITE;
|
||||
else
|
||||
rop[d] = RROP_BLACK;
|
||||
} else {
|
||||
/* Both fg and bg have different bits on this plane */
|
||||
if (fg & mask)
|
||||
rop[d] = RROP_COPY;
|
||||
else
|
||||
rop[d] = RROP_INVERT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Bool
|
||||
afbCreateGC(pGC)
|
||||
|
@ -136,6 +166,95 @@ afbCreateGC(pGC)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
afbComputeCompositeClip(GCPtr pGC, DrawablePtr pDrawable)
|
||||
{
|
||||
if (pDrawable->type == DRAWABLE_WINDOW) {
|
||||
WindowPtr pWin = (WindowPtr) pDrawable;
|
||||
RegionPtr pregWin;
|
||||
Bool freeTmpClip, freeCompClip;
|
||||
|
||||
if (pGC->subWindowMode == IncludeInferiors) {
|
||||
pregWin = NotClippedByChildren(pWin);
|
||||
freeTmpClip = TRUE;
|
||||
} else {
|
||||
pregWin = &pWin->clipList;
|
||||
freeTmpClip = FALSE;
|
||||
}
|
||||
freeCompClip = pGC->freeCompClip;
|
||||
|
||||
/*
|
||||
* if there is no client clip, we can get by with just keeping the
|
||||
* pointer we got, and remembering whether or not should destroy (or
|
||||
* maybe re-use) it later. this way, we avoid unnecessary copying of
|
||||
* regions. (this wins especially if many clients clip by children
|
||||
* and have no client clip.)
|
||||
*/
|
||||
if (pGC->clientClipType == CT_NONE) {
|
||||
if (freeCompClip)
|
||||
REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip);
|
||||
pGC->pCompositeClip = pregWin;
|
||||
pGC->freeCompClip = freeTmpClip;
|
||||
} else {
|
||||
/*
|
||||
* we need one 'real' region to put into the composite clip. if
|
||||
* pregWin the current composite clip are real, we can get rid of
|
||||
* one. if pregWin is real and the current composite clip isn't,
|
||||
* use pregWin for the composite clip. if the current composite
|
||||
* clip is real and pregWin isn't, use the current composite
|
||||
* clip. if neither is real, create a new region.
|
||||
*/
|
||||
|
||||
REGION_TRANSLATE(pGC->pScreen, pGC->clientClip,
|
||||
pDrawable->x + pGC->clipOrg.x,
|
||||
pDrawable->y + pGC->clipOrg.y);
|
||||
|
||||
if (freeCompClip) {
|
||||
REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, pregWin,
|
||||
pGC->clientClip);
|
||||
if (freeTmpClip)
|
||||
REGION_DESTROY(pGC->pScreen, pregWin);
|
||||
} else if (freeTmpClip) {
|
||||
REGION_INTERSECT(pGC->pScreen, pregWin, pregWin, pGC->clientClip);
|
||||
pGC->pCompositeClip = pregWin;
|
||||
} else {
|
||||
pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, NullBox, 0);
|
||||
REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip,
|
||||
pregWin, pGC->clientClip);
|
||||
}
|
||||
pGC->freeCompClip = TRUE;
|
||||
REGION_TRANSLATE(pGC->pScreen, pGC->clientClip,
|
||||
-(pDrawable->x + pGC->clipOrg.x),
|
||||
-(pDrawable->y + pGC->clipOrg.y));
|
||||
}
|
||||
} /* end of composite clip for a window */
|
||||
else {
|
||||
BoxRec pixbounds;
|
||||
|
||||
/* XXX should we translate by drawable.x/y here ? */
|
||||
pixbounds.x1 = 0;
|
||||
pixbounds.y1 = 0;
|
||||
pixbounds.x2 = pDrawable->width;
|
||||
pixbounds.y2 = pDrawable->height;
|
||||
|
||||
if (pGC->freeCompClip) {
|
||||
REGION_RESET(pGC->pScreen, pGC->pCompositeClip, &pixbounds);
|
||||
} else {
|
||||
pGC->freeCompClip = TRUE;
|
||||
pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, &pixbounds, 1);
|
||||
}
|
||||
|
||||
if (pGC->clientClipType == CT_REGION) {
|
||||
REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, -pGC->clipOrg.x,
|
||||
-pGC->clipOrg.y);
|
||||
REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip,
|
||||
pGC->pCompositeClip, pGC->clientClip);
|
||||
REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, pGC->clipOrg.x,
|
||||
pGC->clipOrg.y);
|
||||
}
|
||||
} /* end of composite clip for pixmap */
|
||||
} /* end afbComputeCompositeClip */
|
||||
|
||||
/* Clipping conventions
|
||||
if the drawable is a window
|
||||
CT_REGION ==> pCompositeClip really is the composite
|
||||
|
@ -147,7 +266,7 @@ afbCreateGC(pGC)
|
|||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
static void
|
||||
afbValidateGC(pGC, changes, pDrawable)
|
||||
register GCPtr pGC;
|
||||
unsigned long changes;
|
||||
|
@ -434,7 +553,7 @@ afbValidateGC(pGC, changes, pDrawable)
|
|||
} /* end of new_fill */
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
afbDestroyGC(pGC)
|
||||
GCPtr pGC;
|
||||
{
|
||||
|
@ -445,58 +564,6 @@ afbDestroyGC(pGC)
|
|||
miDestroyGCOps(pGC->ops);
|
||||
}
|
||||
|
||||
/* table to map alu(src, dst) to alu(~src, dst) */
|
||||
int afbInverseAlu[16] = {
|
||||
GXclear,
|
||||
GXandInverted,
|
||||
GXnor,
|
||||
GXcopyInverted,
|
||||
GXand,
|
||||
GXnoop,
|
||||
GXequiv,
|
||||
GXorInverted,
|
||||
GXandReverse,
|
||||
GXxor,
|
||||
GXinvert,
|
||||
GXnand,
|
||||
GXcopy,
|
||||
GXor,
|
||||
GXorReverse,
|
||||
GXset
|
||||
};
|
||||
|
||||
void
|
||||
afbReduceOpaqueStipple(fg, bg, planemask, depth, rop)
|
||||
register PixelType fg;
|
||||
register PixelType bg;
|
||||
register unsigned long planemask;
|
||||
int depth;
|
||||
register unsigned char *rop;
|
||||
{
|
||||
register int d;
|
||||
register Pixel mask = 1;
|
||||
|
||||
bg ^= fg;
|
||||
|
||||
for (d = 0; d < depth; d++, mask <<= 1) {
|
||||
if (!(planemask & mask))
|
||||
rop[d] = RROP_NOP;
|
||||
else if (!(bg & mask)) {
|
||||
/* Both fg and bg have a 0 or 1 in this plane */
|
||||
if (fg & mask)
|
||||
rop[d] = RROP_WHITE;
|
||||
else
|
||||
rop[d] = RROP_BLACK;
|
||||
} else {
|
||||
/* Both fg and bg have different bits on this plane */
|
||||
if (fg & mask)
|
||||
rop[d] = RROP_COPY;
|
||||
else
|
||||
rop[d] = RROP_INVERT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
afbReduceRop(alu, src, planemask, depth, rop)
|
||||
register int alu;
|
||||
|
@ -615,94 +682,3 @@ afbReduceRop(alu, src, planemask, depth, rop)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
afbComputeCompositeClip(pGC, pDrawable)
|
||||
GCPtr pGC;
|
||||
DrawablePtr pDrawable;
|
||||
{
|
||||
if (pDrawable->type == DRAWABLE_WINDOW) {
|
||||
WindowPtr pWin = (WindowPtr) pDrawable;
|
||||
RegionPtr pregWin;
|
||||
Bool freeTmpClip, freeCompClip;
|
||||
|
||||
if (pGC->subWindowMode == IncludeInferiors) {
|
||||
pregWin = NotClippedByChildren(pWin);
|
||||
freeTmpClip = TRUE;
|
||||
} else {
|
||||
pregWin = &pWin->clipList;
|
||||
freeTmpClip = FALSE;
|
||||
}
|
||||
freeCompClip = pGC->freeCompClip;
|
||||
|
||||
/*
|
||||
* if there is no client clip, we can get by with just keeping the
|
||||
* pointer we got, and remembering whether or not should destroy (or
|
||||
* maybe re-use) it later. this way, we avoid unnecessary copying of
|
||||
* regions. (this wins especially if many clients clip by children
|
||||
* and have no client clip.)
|
||||
*/
|
||||
if (pGC->clientClipType == CT_NONE) {
|
||||
if (freeCompClip)
|
||||
REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip);
|
||||
pGC->pCompositeClip = pregWin;
|
||||
pGC->freeCompClip = freeTmpClip;
|
||||
} else {
|
||||
/*
|
||||
* we need one 'real' region to put into the composite clip. if
|
||||
* pregWin the current composite clip are real, we can get rid of
|
||||
* one. if pregWin is real and the current composite clip isn't,
|
||||
* use pregWin for the composite clip. if the current composite
|
||||
* clip is real and pregWin isn't, use the current composite
|
||||
* clip. if neither is real, create a new region.
|
||||
*/
|
||||
|
||||
REGION_TRANSLATE(pGC->pScreen, pGC->clientClip,
|
||||
pDrawable->x + pGC->clipOrg.x,
|
||||
pDrawable->y + pGC->clipOrg.y);
|
||||
|
||||
if (freeCompClip) {
|
||||
REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, pregWin,
|
||||
pGC->clientClip);
|
||||
if (freeTmpClip)
|
||||
REGION_DESTROY(pGC->pScreen, pregWin);
|
||||
} else if (freeTmpClip) {
|
||||
REGION_INTERSECT(pGC->pScreen, pregWin, pregWin, pGC->clientClip);
|
||||
pGC->pCompositeClip = pregWin;
|
||||
} else {
|
||||
pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, NullBox, 0);
|
||||
REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip,
|
||||
pregWin, pGC->clientClip);
|
||||
}
|
||||
pGC->freeCompClip = TRUE;
|
||||
REGION_TRANSLATE(pGC->pScreen, pGC->clientClip,
|
||||
-(pDrawable->x + pGC->clipOrg.x),
|
||||
-(pDrawable->y + pGC->clipOrg.y));
|
||||
}
|
||||
} /* end of composite clip for a window */
|
||||
else {
|
||||
BoxRec pixbounds;
|
||||
|
||||
/* XXX should we translate by drawable.x/y here ? */
|
||||
pixbounds.x1 = 0;
|
||||
pixbounds.y1 = 0;
|
||||
pixbounds.x2 = pDrawable->width;
|
||||
pixbounds.y2 = pDrawable->height;
|
||||
|
||||
if (pGC->freeCompClip) {
|
||||
REGION_RESET(pGC->pScreen, pGC->pCompositeClip, &pixbounds);
|
||||
} else {
|
||||
pGC->freeCompClip = TRUE;
|
||||
pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, &pixbounds, 1);
|
||||
}
|
||||
|
||||
if (pGC->clientClipType == CT_REGION) {
|
||||
REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, -pGC->clipOrg.x,
|
||||
-pGC->clipOrg.y);
|
||||
REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip,
|
||||
pGC->pCompositeClip, pGC->clientClip);
|
||||
REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, pGC->clipOrg.x,
|
||||
pGC->clipOrg.y);
|
||||
}
|
||||
} /* end of composite clip for pixmap */
|
||||
} /* end afbComputeCompositeClip */
|
||||
|
|
|
@ -42,39 +42,8 @@ afbPutImage(pDraw, pGC, depth, x, y, width, height, leftPad, format, pImage)
|
|||
(void)(*pGC->ops->CopyPlane)((DrawablePtr)pPixmap, pDraw, pGC, leftPad,
|
||||
0, width, height, x, y, 1);
|
||||
else {
|
||||
#if 0
|
||||
/* XXX: bit plane order wronge ! */
|
||||
pPixmap->drawable.depth = 1;
|
||||
pPixmap->drawable.bitsPerPixel = 1;
|
||||
|
||||
switch (pGC->alu) {
|
||||
case GXcopy:
|
||||
doBitBlt = afbDoBitbltCopy;
|
||||
break;
|
||||
case GXxor:
|
||||
doBitBlt = afbDoBitbltXor;
|
||||
break;
|
||||
case GXcopyInverted:
|
||||
doBitBlt = afbDoBitbltCopyInverted;
|
||||
break;
|
||||
case GXor:
|
||||
doBitBlt = afbDoBitbltOr;
|
||||
break;
|
||||
default:
|
||||
doBitBlt = afbDoBitbltGeneral;
|
||||
break;
|
||||
}
|
||||
|
||||
for (plane = (1L << (pPixmap->drawable.depth - 1)); plane;
|
||||
plane >>= 1) {
|
||||
(void)afbBitBlt((DrawablePtr)pPixmap, pDraw, pGC, leftPad, 0,
|
||||
width, height, x, y, doBitBlt, plane);
|
||||
/* pDraw->devKind += sizeDst; */
|
||||
}
|
||||
#else
|
||||
(void)(*pGC->ops->CopyArea)((DrawablePtr)pPixmap, pDraw, pGC, leftPad,
|
||||
0, width, height, x, y);
|
||||
#endif
|
||||
}
|
||||
|
||||
pGC->fExpose = TRUE;
|
||||
|
|
|
@ -102,12 +102,8 @@ afbCreatePixmap(pScreen, width, height, depth)
|
|||
pPixmap->drawable.height = height;
|
||||
pPixmap->devKind = paddedWidth;
|
||||
pPixmap->refcnt = 1;
|
||||
#ifdef PIXPRIV
|
||||
pPixmap->devPrivate.ptr = datasize ?
|
||||
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
|
||||
#else
|
||||
pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1);
|
||||
#endif
|
||||
return(pPixmap);
|
||||
}
|
||||
|
||||
|
@ -122,9 +118,8 @@ afbDestroyPixmap(pPixmap)
|
|||
}
|
||||
|
||||
|
||||
PixmapPtr
|
||||
afbCopyPixmap(pSrc)
|
||||
register PixmapPtr pSrc;
|
||||
static PixmapPtr
|
||||
afbCopyPixmap(PixmapPtr pSrc)
|
||||
{
|
||||
register PixmapPtr pDst;
|
||||
int size;
|
||||
|
@ -152,9 +147,8 @@ afbCopyPixmap(pSrc)
|
|||
zero out area to be filled with replicate
|
||||
left shift and or in original as many times as needed
|
||||
*/
|
||||
void
|
||||
afbPadPixmap(pPixmap)
|
||||
PixmapPtr pPixmap;
|
||||
static void
|
||||
afbPadPixmap(PixmapPtr pPixmap)
|
||||
{
|
||||
register int width = pPixmap->drawable.width;
|
||||
register int h;
|
||||
|
|
|
@ -77,7 +77,7 @@ int afbScreenPrivateIndex;
|
|||
|
||||
static unsigned long afbGeneration = 0;
|
||||
|
||||
BSFuncRec afbBSFuncRec = {
|
||||
static BSFuncRec afbBSFuncRec = {
|
||||
afbSaveAreas,
|
||||
afbRestoreAreas,
|
||||
(BackingStoreSetClipmaskRgnProcPtr) 0,
|
||||
|
@ -85,7 +85,7 @@ BSFuncRec afbBSFuncRec = {
|
|||
(BackingStoreGetSpansPixmapProcPtr) 0,
|
||||
};
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
afbCloseScreen(int index, ScreenPtr pScreen)
|
||||
{
|
||||
int d;
|
||||
|
@ -119,7 +119,29 @@ afbCreateScreenResources(ScreenPtr pScreen)
|
|||
return(retval);
|
||||
}
|
||||
|
||||
Bool
|
||||
static PixmapPtr
|
||||
afbGetWindowPixmap(WindowPtr pWin)
|
||||
{
|
||||
#ifdef PIXMAP_PER_WINDOW
|
||||
return (PixmapPtr)(pWin->devPrivates[frameWindowPrivateIndex].ptr);
|
||||
#else
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
|
||||
return (* pScreen->GetScreenPixmap)(pScreen);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
afbSetWindowPixmap(WindowPtr pWin, PixmapPtr pPix)
|
||||
{
|
||||
#ifdef PIXMAP_PER_WINDOW
|
||||
pWin->devPrivates[frameWindowPrivateIndex].ptr = (pointer)pPix;
|
||||
#else
|
||||
(* pWin->drawable.pScreen->SetScreenPixmap)(pPix);
|
||||
#endif
|
||||
}
|
||||
|
||||
static Bool
|
||||
afbAllocatePrivates(ScreenPtr pScreen, int *pWinIndex, int *pGCIndex)
|
||||
{
|
||||
if (afbGeneration != serverGeneration) {
|
||||
|
@ -216,25 +238,3 @@ afbScreenInit(register ScreenPtr pScreen, pointer pbits, int xsize, int ysize, i
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
PixmapPtr
|
||||
afbGetWindowPixmap(WindowPtr pWin)
|
||||
{
|
||||
#ifdef PIXMAP_PER_WINDOW
|
||||
return (PixmapPtr)(pWin->devPrivates[frameWindowPrivateIndex].ptr);
|
||||
#else
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
|
||||
return (* pScreen->GetScreenPixmap)(pScreen);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
afbSetWindowPixmap(WindowPtr pWin, PixmapPtr pPix)
|
||||
{
|
||||
#ifdef PIXMAP_PER_WINDOW
|
||||
pWin->devPrivates[frameWindowPrivateIndex].ptr = (pointer)pPix;
|
||||
#else
|
||||
(* pWin->drawable.pScreen->SetScreenPixmap)(pPix);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -73,20 +73,10 @@ SOFTWARE.
|
|||
* boxes, we may not want to start grabbing bits at psrc but at some offset
|
||||
* further on.)
|
||||
*/
|
||||
void
|
||||
afbSetScanline(y, xOrigin, xStart, xEnd, psrc, alu, pdstBase, widthDst,
|
||||
sizeDst, depthDst, sizeSrc)
|
||||
int y;
|
||||
int xOrigin; /* where this scanline starts */
|
||||
int xStart; /* first bit to use from scanline */
|
||||
int xEnd; /* last bit to use from scanline + 1 */
|
||||
register PixelType *psrc;
|
||||
register int alu; /* raster op */
|
||||
PixelType *pdstBase; /* start of the drawable */
|
||||
int widthDst; /* width of drawable in words */
|
||||
int sizeDst;
|
||||
int depthDst;
|
||||
int sizeSrc;
|
||||
static void
|
||||
afbSetScanline(int y, int xOrigin, int xStart, int xEnd, PixelType *psrc,
|
||||
int alu, PixelType *pdstBase, int widthDst, int sizeDst,
|
||||
int depthDst, int sizeSrc)
|
||||
{
|
||||
int w; /* width of scanline in bits */
|
||||
register PixelType *pdst; /* where to put the bits */
|
||||
|
|
|
@ -96,12 +96,8 @@ cfbCreatePixmap (pScreen, width, height, depth)
|
|||
pPixmap->drawable.height = height;
|
||||
pPixmap->devKind = paddedWidth;
|
||||
pPixmap->refcnt = 1;
|
||||
#ifdef PIXPRIV
|
||||
pPixmap->devPrivate.ptr = datasize ?
|
||||
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
|
||||
#else
|
||||
pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1);
|
||||
#endif
|
||||
return pPixmap;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
#include "compint.h"
|
||||
|
||||
void
|
||||
static void
|
||||
compReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure)
|
||||
{
|
||||
WindowPtr pWin = (WindowPtr) closure;
|
||||
|
|
|
@ -50,10 +50,10 @@
|
|||
#include "compint.h"
|
||||
|
||||
static CARD8 CompositeReqCode;
|
||||
int CompositeClientPrivateIndex;
|
||||
static int CompositeClientPrivateIndex;
|
||||
RESTYPE CompositeClientWindowType;
|
||||
RESTYPE CompositeClientSubwindowsType;
|
||||
RESTYPE CompositeClientOverlayType;
|
||||
static RESTYPE CompositeClientOverlayType;
|
||||
|
||||
static void deleteCompOverlayClient (CompOverlayClientPtr pOcToDel,
|
||||
ScreenPtr pScreen);
|
||||
|
@ -423,7 +423,7 @@ createOverlayWindow (ScreenPtr pScreen)
|
|||
return pWin;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
ProcCompositeGetOverlayWindow (ClientPtr client)
|
||||
{
|
||||
REQUEST(xCompositeGetOverlayWindowReq);
|
||||
|
@ -477,7 +477,7 @@ ProcCompositeGetOverlayWindow (ClientPtr client)
|
|||
return client->noClientException;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
ProcCompositeReleaseOverlayWindow (ClientPtr client)
|
||||
{
|
||||
REQUEST(xCompositeReleaseOverlayWindowReq);
|
||||
|
@ -515,7 +515,7 @@ ProcCompositeReleaseOverlayWindow (ClientPtr client)
|
|||
return client->noClientException;
|
||||
}
|
||||
|
||||
int (*ProcCompositeVector[CompositeNumberRequests])(ClientPtr) = {
|
||||
static int (*ProcCompositeVector[CompositeNumberRequests])(ClientPtr) = {
|
||||
ProcCompositeQueryVersion,
|
||||
ProcCompositeRedirectWindow,
|
||||
ProcCompositeRedirectSubwindows,
|
||||
|
@ -625,7 +625,7 @@ SProcCompositeNameWindowPixmap (ClientPtr client)
|
|||
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
SProcCompositeGetOverlayWindow (ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
|
@ -637,7 +637,7 @@ SProcCompositeGetOverlayWindow (ClientPtr client)
|
|||
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
SProcCompositeReleaseOverlayWindow (ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
|
@ -649,7 +649,7 @@ SProcCompositeReleaseOverlayWindow (ClientPtr client)
|
|||
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
||||
}
|
||||
|
||||
int (*SProcCompositeVector[CompositeNumberRequests])(ClientPtr) = {
|
||||
static int (*SProcCompositeVector[CompositeNumberRequests])(ClientPtr) = {
|
||||
SProcCompositeQueryVersion,
|
||||
SProcCompositeRedirectWindow,
|
||||
SProcCompositeRedirectSubwindows,
|
||||
|
@ -678,6 +678,30 @@ CompositeExtensionInit (void)
|
|||
ExtensionEntry *extEntry;
|
||||
int s;
|
||||
|
||||
for (s = 0; s < screenInfo.numScreens; s++) {
|
||||
ScreenPtr pScreen = screenInfo.screens[s];
|
||||
VisualPtr vis;
|
||||
|
||||
/* Composite on 8bpp pseudocolor root windows appears to fail, so
|
||||
* just disable it on anything pseudocolor for safety.
|
||||
*/
|
||||
for (vis = pScreen->visuals; vis->vid != pScreen->rootVisual; vis++)
|
||||
;
|
||||
if ((vis->class | DynamicClass) == PseudoColor)
|
||||
return;
|
||||
|
||||
/* Ensure that Render is initialized, which is required for automatic
|
||||
* compositing.
|
||||
*/
|
||||
if (GetPictureScreenIfSet(pScreen) == NULL)
|
||||
return;
|
||||
}
|
||||
/* Xinerama's rewriting of window drawing before Composite gets to it
|
||||
* breaks Composite.
|
||||
*/
|
||||
if (!noPanoramiXExtension)
|
||||
return;
|
||||
|
||||
CompositeClientWindowType = CreateNewResourceType (FreeCompositeClientWindow);
|
||||
if (!CompositeClientWindowType)
|
||||
return;
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
int CompScreenPrivateIndex;
|
||||
int CompWindowPrivateIndex;
|
||||
int CompSubwindowsPrivateIndex;
|
||||
int CompGeneration;
|
||||
static int CompGeneration;
|
||||
|
||||
|
||||
static Bool
|
||||
|
|
|
@ -171,9 +171,6 @@ extern RESTYPE CompositeClientSubwindowsType;
|
|||
* compalloc.c
|
||||
*/
|
||||
|
||||
void
|
||||
compReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure);
|
||||
|
||||
Bool
|
||||
compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update);
|
||||
|
||||
|
@ -292,18 +289,6 @@ compWindowUpdate (WindowPtr pWin);
|
|||
void
|
||||
deleteCompOverlayClientsForScreen (ScreenPtr pScreen);
|
||||
|
||||
int
|
||||
ProcCompositeGetOverlayWindow (ClientPtr client);
|
||||
|
||||
int
|
||||
ProcCompositeReleaseOverlayWindow (ClientPtr client);
|
||||
|
||||
int
|
||||
SProcCompositeGetOverlayWindow (ClientPtr client);
|
||||
|
||||
int
|
||||
SProcCompositeReleaseOverlayWindow (ClientPtr client);
|
||||
|
||||
WindowPtr
|
||||
CompositeRealChildHead (WindowPtr pWin);
|
||||
|
||||
|
|
|
@ -303,15 +303,15 @@ configSetup(void)
|
|||
if (!configData)
|
||||
configData = (struct config_data *) xcalloc(sizeof(struct config_data), 1);
|
||||
if (!configData) {
|
||||
ErrorF("[dbus] failed to allocate data struct.\n");
|
||||
ErrorF("[dbus] failed to allocate data struct\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
dbus_error_init(&error);
|
||||
configData->connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
|
||||
if (!configData->connection || dbus_error_is_set(&error)) {
|
||||
ErrorF("[dbus] some kind of error occurred: %s (%s)\n", error.name,
|
||||
error.message);
|
||||
DebugF("[dbus] some kind of error occurred while connecting: %s (%s)\n",
|
||||
error.name, error.message);
|
||||
dbus_error_free(&error);
|
||||
xfree(configData);
|
||||
configData = NULL;
|
||||
|
|
220
configure.ac
220
configure.ac
|
@ -25,7 +25,7 @@ dnl Process this file with autoconf to create configure.
|
|||
AC_PREREQ(2.57)
|
||||
dnl This is the not the Xorg version number, it's the server version number.
|
||||
dnl Yes, that's weird.
|
||||
AC_INIT([xorg-server], 1.2.99.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
|
||||
AC_INIT([xorg-server], 1.3.99.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
|
||||
AM_MAINTAINER_MODE
|
||||
|
@ -280,6 +280,7 @@ case $host_cpu in
|
|||
use_x86_asm="yes"
|
||||
I386_VIDEO=yes
|
||||
case $host_os in
|
||||
darwin*) use_x86_asm="no" ;;
|
||||
*linux*) DEFAULT_INT10=vm86 ;;
|
||||
*freebsd*) AC_DEFINE(USE_DEV_IO) ;;
|
||||
*netbsd*) AC_DEFINE(USE_I386_IOPL)
|
||||
|
@ -305,6 +306,7 @@ case $host_cpu in
|
|||
use_x86_asm="yes"
|
||||
I386_VIDEO=yes
|
||||
case $host_os in
|
||||
darwin*) use_x86_asm="no" ;;
|
||||
*freebsd*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;;
|
||||
*netbsd*) AC_DEFINE(USE_I386_IOPL, 1, [BSD i386 iopl])
|
||||
SYS_LIBS=-lx86_64
|
||||
|
@ -473,6 +475,10 @@ AC_ARG_WITH(rgb-path, AS_HELP_STRING([--with-rgb-path=PATH], [Path to RG
|
|||
AC_ARG_WITH(dri-driver-path, AS_HELP_STRING([--with-dri-driver-path=PATH], [Path to DRI drivers (default: ${libdir}/dri)]),
|
||||
[ DRI_DRIVER_PATH="$withval" ],
|
||||
[ DRI_DRIVER_PATH="${libdir}/dri" ])
|
||||
APPLE_APPLICATIONS_DIR="${bindir}/Applications"
|
||||
AC_ARG_WITH(apple-applications-dir,AS_HELP_STRING([--with-apple-applications-dir=PATH], [Path to the Applications directory (default: ${bindir}/Applications)]),
|
||||
[ APPLE_APPLICATIONS_DIR="${withval}" ].
|
||||
[ APPLE_APPLICATIONS_DIR="${bindir}/Applications" ])
|
||||
AC_ARG_ENABLE(builddocs, AS_HELP_STRING([--enable-builddocs], [Build docs (default: disabled)]),
|
||||
[BUILDDOCS=$enableval],
|
||||
[BUILDDOCS=no])
|
||||
|
@ -495,6 +501,7 @@ AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes exten
|
|||
AC_ARG_ENABLE(xtrap, AS_HELP_STRING([--disable-xtrap], [Build XTrap extension (default: enabled)]), [XTRAP=$enableval], [XTRAP=yes])
|
||||
AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes])
|
||||
AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes])
|
||||
AC_ARG_ENABLE(quartz, AS_HELP_STRING([--enable-quartz], [Build with darwin quartz support (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
|
||||
AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes])
|
||||
AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto])
|
||||
AC_ARG_ENABLE(screensaver, AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes])
|
||||
|
@ -525,7 +532,7 @@ AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build
|
|||
|
||||
dnl DDXes.
|
||||
AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
|
||||
AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: auto)]), [DMX=$enableval], [DMX=auto])
|
||||
AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: no)]), [DMX=$enableval], [DMX=no])
|
||||
AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes])
|
||||
AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto])
|
||||
AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
|
||||
|
@ -533,6 +540,10 @@ AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint ex
|
|||
AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no])
|
||||
AC_ARG_ENABLE(xglx, AS_HELP_STRING([--enable-xglx], [Build Xglx xgl module (default: no)]), [XGLX=$enableval], [XGLX=no])
|
||||
AC_ARG_ENABLE(xegl, AS_HELP_STRING([--enable-xegl], [Build Xegl xgl module (default: no)]), [XEGL=$enableval], [XEGL=no])
|
||||
dnl legacy fb support
|
||||
AC_ARG_ENABLE(mfb, AS_HELP_STRING([--enable-mfb], [Build legacy mono framebuffer support (default: enabled)]), [MFB=$enableval], [MFB=$XORG])
|
||||
AC_ARG_ENABLE(cfb, AS_HELP_STRING([--enable-cfb], [Build legacy color framebuffer support (default: enabled)]), [CFB=$enableval], [CFB=$XORG])
|
||||
AC_ARG_ENABLE(afb, AS_HELP_STRING([--enable-afb], [Build legacy advanced framebuffer support (default: enabled)]), [AFB=$enableval], [AFB=$XORG])
|
||||
dnl kdrive and its subsystems
|
||||
AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no])
|
||||
AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto])
|
||||
|
@ -842,10 +853,6 @@ AC_DEFINE(DAMAGE,1,[Support Damage extension])
|
|||
DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la'
|
||||
DAMAGE_INC='-I$(top_srcdir)/damageext'
|
||||
MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la'
|
||||
dnl damage (may) need the composite wrapper when composite is enabled
|
||||
if test "$COMPOSITE" = yes; then
|
||||
MIEXT_DAMAGE_LIB="$MIEXT_DAMAGE_LIB "'$(top_builddir)/miext/cw/libcw.la'
|
||||
fi
|
||||
MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage'
|
||||
|
||||
AC_DEFINE(XINPUT, 1, [Support X Input extension])
|
||||
|
@ -1007,6 +1014,9 @@ if test "x$GCC" = "xyes"; then
|
|||
LD_EXPORT_SYMBOLS_FLAG="-rdynamic"
|
||||
fi
|
||||
case $host_os in
|
||||
darwin*)
|
||||
LD_EXPORT_SYMBOLS_FLAG=""
|
||||
;;
|
||||
openbsd*)
|
||||
LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic"
|
||||
;;
|
||||
|
@ -1064,7 +1074,19 @@ AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4])
|
|||
AC_MSG_RESULT([yes])], AC_MSG_RESULT([no]))
|
||||
|
||||
XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC"
|
||||
AC_DEFINE_UNQUOTED(X_BYTE_ORDER,[$ENDIAN],[Endian order])
|
||||
AC_DEFINE_UNQUOTED(_X_BYTE_ORDER,[$ENDIAN],[Endian order])
|
||||
AH_VERBATIM([X_BYTE_ORDER],[
|
||||
/* Deal with multiple architecture compiles on Mac OS X */
|
||||
#ifndef __APPLE_CC__
|
||||
#define X_BYTE_ORDER _X_BYTE_ORDER
|
||||
#else
|
||||
#ifdef __BIG_ENDIAN__
|
||||
#define X_BYTE_ORDER X_BIG_ENDIAN
|
||||
#else
|
||||
#define X_BYTE_ORDER X_LITTLE_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
])
|
||||
|
||||
AC_SUBST([XSERVER_LIBS])
|
||||
|
||||
|
@ -1155,7 +1177,6 @@ if test "x$XORG" = xauto; then
|
|||
XORG="yes"
|
||||
case $host_os in
|
||||
cygwin*) XORG="no" ;;
|
||||
darwin*) XORG="no" ;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT([$XORG])
|
||||
|
@ -1232,37 +1253,6 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
|
|||
XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
|
||||
XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $OS_LIB"
|
||||
|
||||
if test "x$DGA" = xauto; then
|
||||
PKG_CHECK_MODULES(DGA, xf86dgaproto, [DGA=yes], [DGA=no])
|
||||
fi
|
||||
if test "x$DGA" = xyes; then
|
||||
XORG_MODULES="$XORG_MODULES xf86dgaproto"
|
||||
AC_DEFINE(DGA, 1, [Support DGA extension])
|
||||
AC_DEFINE(XFreeXDGA, 1, [Build XDGA support])
|
||||
fi
|
||||
|
||||
if test "x$XF86MISC" = xauto; then
|
||||
PKG_CHECK_MODULES(XF86MISC, xf86miscproto, [XF86MISC=yes], [XF86MISC=no])
|
||||
fi
|
||||
if test "x$XF86MISC" = xyes; then
|
||||
XORG_MODULES="$XORG_MODULES xf86miscproto"
|
||||
AC_DEFINE(XF86MISC, 1, [Support XFree86 miscellaneous extensions])
|
||||
fi
|
||||
|
||||
if test "x$XF86VIDMODE" = xauto; then
|
||||
PKG_CHECK_MODULES(XF86VIDMODE, xf86vidmodeproto, [XF86VIDMODE=yes], [XF86VIDMODE=no])
|
||||
fi
|
||||
if test "x$XF86VIDMODE" = xyes; then
|
||||
XORG_MODULES="$XORG_MODULES xf86vidmodeproto"
|
||||
AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension])
|
||||
fi
|
||||
|
||||
if test -n "$XORG_MODULES"; then
|
||||
PKG_CHECK_MODULES(XORG_MODULES, [$XORG_MODULES])
|
||||
XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS"
|
||||
XORG_LIBS="$XORG_LIBS $XORG_MODULES_LIBS"
|
||||
fi
|
||||
|
||||
dnl Check to see if dlopen is in default libraries (like Solaris, which
|
||||
dnl has it in libc), or if libdl is needed to get it.
|
||||
AC_CHECK_FUNC([dlopen], [],
|
||||
|
@ -1273,6 +1263,64 @@ dnl has it in libc), or if libdl is needed to get it.
|
|||
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
|
||||
|
||||
case $host_os in
|
||||
darwin*)
|
||||
XORG_OS="Darwin"
|
||||
build_darwin=yes
|
||||
if test "X$XQUARTZ" = Xauto; then
|
||||
AC_CACHE_CHECK([for Carbon framework],xorg_cv_Carbon_framework,[
|
||||
save_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -framework Carbon"
|
||||
AC_LINK_IFELSE([char FSFindFolder();
|
||||
int main() {
|
||||
FSFindFolder();
|
||||
return 0;}
|
||||
],[xorg_cv_Carbon_framework=yes],
|
||||
[xorg_cv_Carbon_framework=no])
|
||||
LDFLAGS=$save_LDFLAGS])
|
||||
if test "X$xorg_cv_Carbon_framework" = Xyes; then
|
||||
AC_DEFINE([DARWIN_WITH_QUARTZ],[1],
|
||||
[Have Quartz])
|
||||
XQUARTZ=yes
|
||||
else
|
||||
XQUARTZ=no
|
||||
fi
|
||||
fi
|
||||
# glxAGL / glxCGL don't work yet
|
||||
# AC_CACHE_CHECK([for AGL framework],xorg_cv_AGL_framework,[
|
||||
# save_LDFLAGS=$LDFLAGS
|
||||
# LDFLAGS="$LDFLAGS -framework AGL"
|
||||
# AC_LINK_IFELSE([char aglEnable();
|
||||
#int main() {
|
||||
#aglEnable();
|
||||
#return 0;}
|
||||
# ],[xorg_cv_AGL_framework=yes],
|
||||
# [xorg_cv_AGL_framework=no])
|
||||
# LDFLAGS=$save_LDFLAGS
|
||||
# ])
|
||||
xorg_cv_AGL_framework=no
|
||||
DARWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB"
|
||||
AC_SUBST([DARWIN_LIBS])
|
||||
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
||||
AC_SUBST([APPLE_APPLICATIONS_DIR])
|
||||
CFLAGS="${CFLAGS} -D__DARWIN__"
|
||||
PLIST_VERSION_STRING=$VENDOR_VERSION_STRING
|
||||
AC_SUBST([PLIST_VERSION_STRING])
|
||||
PLIST_VENDOR_WEB=$VENDOR_WEB
|
||||
AC_SUBST([PLIST_VENDOR_WEB])
|
||||
# Not sure that we should be disabling all these...
|
||||
if test "x$XF86MISC" = xyes || test "x$XF86MISC" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling XF86Misc extension])
|
||||
XF86MISC=no
|
||||
fi
|
||||
if test "x$XF86VIDMODE" = xyes || test "x$XF86VIDMODE" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling XF86VidMode extension])
|
||||
XF86VIDMODE=no
|
||||
fi
|
||||
if test "x$DGA" = xyes || test "x$DGA" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling DGA extension])
|
||||
DGA=no
|
||||
fi
|
||||
;;
|
||||
linux*)
|
||||
if test "x$LNXAPM" = xyes; then
|
||||
XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
|
||||
|
@ -1365,6 +1413,8 @@ dnl has it in libc), or if libdl is needed to get it.
|
|||
fi
|
||||
if test "${OS_MINOR}" -lt 8 ; then
|
||||
solaris_usl_console="yes"
|
||||
else
|
||||
XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
@ -1395,11 +1445,14 @@ dnl has it in libc), or if libdl is needed to get it.
|
|||
|
||||
case $host_cpu in
|
||||
i*86)
|
||||
xorg_bus_ix86pci=yes
|
||||
case $host_os in
|
||||
darwin*) ;;
|
||||
*) xorg_bus_ix86pci=yes ;;
|
||||
esac
|
||||
;;
|
||||
powerpc*)
|
||||
case $host_os in
|
||||
linux*|freebsd*|netbsd*|openbsd*|kfreebsd*-gnu)
|
||||
darwin*|linux*|freebsd*|netbsd*|openbsd*|kfreebsd*-gnu)
|
||||
;;
|
||||
*)
|
||||
xorg_bus_ppcpci="yes"
|
||||
|
@ -1412,7 +1465,7 @@ dnl has it in libc), or if libdl is needed to get it.
|
|||
;;
|
||||
x86_64*|amd64*)
|
||||
case $host_os in
|
||||
freebsd*|kfreebsd*-gnu)
|
||||
darwin*|freebsd*|kfreebsd*-gnu)
|
||||
# FreeBSD uses the system pci interface
|
||||
;;
|
||||
*)
|
||||
|
@ -1425,6 +1478,37 @@ dnl has it in libc), or if libdl is needed to get it.
|
|||
if test "x$XORG_OS_PCI" = x ; then
|
||||
XORG_OS_PCI=$XORG_OS
|
||||
fi
|
||||
if test "x$DGA" = xauto; then
|
||||
PKG_CHECK_MODULES(DGA, xf86dgaproto, [DGA=yes], [DGA=no])
|
||||
fi
|
||||
if test "x$DGA" = xyes; then
|
||||
XORG_MODULES="$XORG_MODULES xf86dgaproto"
|
||||
AC_DEFINE(DGA, 1, [Support DGA extension])
|
||||
AC_DEFINE(XFreeXDGA, 1, [Build XDGA support])
|
||||
fi
|
||||
|
||||
if test "x$XF86MISC" = xauto; then
|
||||
PKG_CHECK_MODULES(XF86MISC, xf86miscproto, [XF86MISC=yes], [XF86MISC=no])
|
||||
fi
|
||||
if test "x$XF86MISC" = xyes; then
|
||||
XORG_MODULES="$XORG_MODULES xf86miscproto"
|
||||
AC_DEFINE(XF86MISC, 1, [Support XFree86 miscellaneous extensions])
|
||||
fi
|
||||
|
||||
if test "x$XF86VIDMODE" = xauto; then
|
||||
PKG_CHECK_MODULES(XF86VIDMODE, xf86vidmodeproto, [XF86VIDMODE=yes], [XF86VIDMODE=no])
|
||||
fi
|
||||
if test "x$XF86VIDMODE" = xyes; then
|
||||
XORG_MODULES="$XORG_MODULES xf86vidmodeproto"
|
||||
AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension])
|
||||
fi
|
||||
|
||||
if test -n "$XORG_MODULES"; then
|
||||
PKG_CHECK_MODULES(XORG_MODULES, [$XORG_MODULES])
|
||||
XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS"
|
||||
XORG_LIBS="$XORG_LIBS $XORG_MODULES_LIBS"
|
||||
fi
|
||||
|
||||
AC_SUBST([XORG_LIBS])
|
||||
AC_SUBST([XORG_INCS])
|
||||
AC_SUBST([XORG_OS])
|
||||
|
@ -1484,11 +1568,23 @@ AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes])
|
|||
AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes])
|
||||
AM_CONDITIONAL([SOLARIS_USL_CONSOLE], [test "x$solaris_usl_console" = xyes])
|
||||
AM_CONDITIONAL([SOLARIS_ASM_INLINE], [test "x$solaris_asm_inline" = xyes])
|
||||
AM_CONDITIONAL(MFB, [test "x$XORG" = xyes])
|
||||
AM_CONDITIONAL(CFB, [test "x$XORG" = xyes])
|
||||
AM_CONDITIONAL(AFB, [test "x$XORG" = xyes])
|
||||
AM_CONDITIONAL([BUILD_DARWIN],[test "X$build_darwin" = Xyes])
|
||||
AM_CONDITIONAL([XQUARTZ],[test "X$XQUARTZ" = Xyes])
|
||||
AM_CONDITIONAL(DGA, [test "x$DGA" = xyes])
|
||||
|
||||
dnl legacy fb support
|
||||
test "x$MFB" = xauto && MFB="$XORG"
|
||||
test "x$CFB" = xauto && CFB="$XORG"
|
||||
test "x$AFB" = xauto && AFB="$XORG"
|
||||
AM_CONDITIONAL(MFB, [test "x$MFB" = xyes])
|
||||
AM_CONDITIONAL(CFB, [test "x$CFB" = xyes])
|
||||
AM_CONDITIONAL(AFB, [test "x$AFB" = xyes])
|
||||
if test "x$MFB" = xyes -o "x$CFB" = xyes -o "x$AFB" = xyes; then
|
||||
if test "x$XORG" != xyes; then
|
||||
AC_MSG_ERROR([legacy fb support requires the Xorg server])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Xprint DDX
|
||||
|
||||
AC_MSG_CHECKING([whether to build Xprint DDX])
|
||||
|
@ -1497,7 +1593,7 @@ AC_MSG_RESULT([$XPRINT])
|
|||
if test "x$XPRINT" = xyes; then
|
||||
PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau])
|
||||
XPRINT_EXTENSIONS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS"
|
||||
XPRINT_LIBS="$XPRINT_LIBS $DIX_LIB $CONFIG_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS"
|
||||
XPRINT_LIBS="$DIX_LIB $CONFIG_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS $XPRINT_LIBS"
|
||||
AC_SUBST([XPRINT_CFLAGS])
|
||||
AC_SUBST([XPRINT_LIBS])
|
||||
|
||||
|
@ -1611,6 +1707,21 @@ AM_CONDITIONAL(XWIN_PRIMARYFB, [test "x$XWIN" = xyes && false])
|
|||
AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes])
|
||||
AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes])
|
||||
|
||||
dnl Darwin / OS X DDX
|
||||
AM_CONDITIONAL(HAVE_X_PLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes])
|
||||
AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes])
|
||||
# Support for objc in autotools is minimal and not
|
||||
# documented.
|
||||
OBJC='$(CC)'
|
||||
OBJCLD='$(CCLD)'
|
||||
OBJCLINK='$(LINK)'
|
||||
OBJCFLAGS='$(CFLAGS)'
|
||||
AC_SUBST([OBJC])
|
||||
AC_SUBST([OBJCCLD])
|
||||
AC_SUBST([OBJCLINK])
|
||||
AC_SUBST([OBJCFLAGS])
|
||||
# internal, undocumented automake func follows :(
|
||||
_AM_DEPENDENCIES([OBJC])
|
||||
|
||||
dnl kdrive DDX
|
||||
|
||||
|
@ -1844,6 +1955,7 @@ XORG_RELEASE_VERSION
|
|||
AC_OUTPUT([
|
||||
Makefile
|
||||
GL/Makefile
|
||||
GL/apple/Makefile
|
||||
GL/glx/Makefile
|
||||
GL/mesa/Makefile
|
||||
GL/mesa/glapi/Makefile
|
||||
|
@ -1877,6 +1989,8 @@ miext/damage/Makefile
|
|||
miext/shadow/Makefile
|
||||
miext/cw/Makefile
|
||||
miext/rootless/Makefile
|
||||
miext/rootless/safeAlpha/Makefile
|
||||
miext/rootless/accel/Makefile
|
||||
os/Makefile
|
||||
randr/Makefile
|
||||
render/Makefile
|
||||
|
@ -1903,6 +2017,7 @@ hw/xfree86/fbdevhw/Makefile
|
|||
hw/xfree86/i2c/Makefile
|
||||
hw/xfree86/int10/Makefile
|
||||
hw/xfree86/loader/Makefile
|
||||
hw/xfree86/modes/Makefile
|
||||
hw/xfree86/os-support/Makefile
|
||||
hw/xfree86/os-support/bsd/Makefile
|
||||
hw/xfree86/os-support/bus/Makefile
|
||||
|
@ -1950,6 +2065,19 @@ hw/xgl/glxext/module/Makefile
|
|||
hw/xnest/Makefile
|
||||
hw/xwin/Makefile
|
||||
hw/darwin/Makefile
|
||||
hw/darwin/bundle/Makefile
|
||||
hw/darwin/bundle/Dutch.lproj/Makefile
|
||||
hw/darwin/bundle/English.lproj/Makefile
|
||||
hw/darwin/bundle/French.lproj/Makefile
|
||||
hw/darwin/bundle/German.lproj/Makefile
|
||||
hw/darwin/bundle/Japanese.lproj/Makefile
|
||||
hw/darwin/bundle/Portuguese.lproj/Makefile
|
||||
hw/darwin/bundle/Spanish.lproj/Makefile
|
||||
hw/darwin/bundle/Swedish.lproj/Makefile
|
||||
hw/darwin/bundle/ko.lproj/Makefile
|
||||
hw/darwin/iokit/Makefile
|
||||
hw/darwin/quartz/Makefile
|
||||
hw/darwin/utils/Makefile
|
||||
hw/kdrive/Makefile
|
||||
hw/kdrive/ati/Makefile
|
||||
hw/kdrive/chips/Makefile
|
||||
|
|
|
@ -28,12 +28,12 @@
|
|||
|
||||
#include "damageextint.h"
|
||||
|
||||
unsigned char DamageReqCode;
|
||||
int DamageEventBase;
|
||||
int DamageErrorBase;
|
||||
int DamageClientPrivateIndex;
|
||||
RESTYPE DamageExtType;
|
||||
RESTYPE DamageExtWinType;
|
||||
static unsigned char DamageReqCode;
|
||||
static int DamageEventBase;
|
||||
static int DamageErrorBase;
|
||||
static int DamageClientPrivateIndex;
|
||||
static RESTYPE DamageExtType;
|
||||
static RESTYPE DamageExtWinType;
|
||||
|
||||
/* Version of the damage extension supported by the server, as opposed to the
|
||||
* DAMAGE_* defines from damageproto for what version the proto header
|
||||
|
@ -319,7 +319,7 @@ static const int version_requests[] = {
|
|||
|
||||
#define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0]))
|
||||
|
||||
int (*ProcDamageVector[XDamageNumberRequests])(ClientPtr) = {
|
||||
static int (*ProcDamageVector[XDamageNumberRequests])(ClientPtr) = {
|
||||
/*************** Version 1 ******************/
|
||||
ProcDamageQueryVersion,
|
||||
ProcDamageCreate,
|
||||
|
@ -408,7 +408,7 @@ SProcDamageAdd (ClientPtr client)
|
|||
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
||||
}
|
||||
|
||||
int (*SProcDamageVector[XDamageNumberRequests])(ClientPtr) = {
|
||||
static int (*SProcDamageVector[XDamageNumberRequests])(ClientPtr) = {
|
||||
/*************** Version 1 ******************/
|
||||
SProcDamageQueryVersion,
|
||||
SProcDamageCreate,
|
||||
|
@ -478,7 +478,7 @@ FreeDamageExtWin (pointer value, XID wid)
|
|||
return Success;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SDamageNotifyEvent (xDamageNotifyEvent *from,
|
||||
xDamageNotifyEvent *to)
|
||||
{
|
||||
|
|
|
@ -44,13 +44,6 @@
|
|||
#include "damage.h"
|
||||
#include "xfixes.h"
|
||||
|
||||
extern unsigned char DamageReqCode;
|
||||
extern int DamageEventBase;
|
||||
extern int DamageErrorBase;
|
||||
extern int DamageClientPrivateIndex;
|
||||
extern RESTYPE DamageExtType;
|
||||
extern RESTYPE DamageExtWinType;
|
||||
|
||||
typedef struct _DamageClient {
|
||||
CARD32 major_version;
|
||||
CARD32 minor_version;
|
||||
|
@ -67,9 +60,6 @@ typedef struct _DamageExt {
|
|||
XID id;
|
||||
} DamageExtRec, *DamageExtPtr;
|
||||
|
||||
extern int (*ProcDamageVector[/*XDamageNumberRequests*/])(ClientPtr);
|
||||
extern int (*SProcDamageVector[/*XDamageNumberRequests*/])(ClientPtr);
|
||||
|
||||
#define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \
|
||||
pDamageExt = SecurityLookupIDByType (client, rid, DamageExtType, mode); \
|
||||
if (!pDamageExt) { \
|
||||
|
@ -78,10 +68,6 @@ extern int (*SProcDamageVector[/*XDamageNumberRequests*/])(ClientPtr);
|
|||
} \
|
||||
}
|
||||
|
||||
void
|
||||
SDamageNotifyEvent (xDamageNotifyEvent *from,
|
||||
xDamageNotifyEvent *to);
|
||||
|
||||
void
|
||||
DamageExtSetCritical (ClientPtr pClient, Bool critical);
|
||||
|
||||
|
|
31
dbe/dbe.c
31
dbe/dbe.c
|
@ -79,36 +79,6 @@ static int dbeErrorBase;
|
|||
*/
|
||||
static Bool firstRegistrationPass = TRUE;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* DBE DIX Procedure: DbeValidateBuffer
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* This function is called from VALIDATE_DRAWABLE_AND_GC and from
|
||||
* various places in dispatch.c if the server has been compiled with
|
||||
* the flags -DNEED_DBE_BUF_BITS and -DNEED_DBE_BUF_VALIDATE.
|
||||
* When pWin->dstBuffer changes, this function will be called with pWin
|
||||
* as the first argument, the drawable ID that was specified as the
|
||||
* second argument (could be a back buffer id), and True for the third
|
||||
* argument.
|
||||
* When pWin->srcBuffer changes, the third argument will be False, and
|
||||
* the first two arguments are as described for dstBuffer.
|
||||
*
|
||||
* This function should prepare the hardware to access the specified
|
||||
* buffer for reads (if dstbuf is False) or writes (if dstbuf is True).
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
DbeValidateBuffer(WindowPtr pWin, XID drawID, Bool dstbuf)
|
||||
{
|
||||
DbeScreenPrivPtr pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(pWin);
|
||||
if (pDbeScreenPriv->ValidateBuffer)
|
||||
(*pDbeScreenPriv->ValidateBuffer)(pWin, drawID, dstbuf);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
|
@ -317,7 +287,6 @@ DbeStubScreen(DbeScreenPrivPtr pDbeScreenPriv, int *nStubbedScreens)
|
|||
pDbeScreenPriv->EndIdiom = NULL;
|
||||
pDbeScreenPriv->WinPrivDelete = NULL;
|
||||
pDbeScreenPriv->ResetProc = NULL;
|
||||
pDbeScreenPriv->ValidateBuffer = NULL;
|
||||
|
||||
(*nStubbedScreens)++;
|
||||
|
||||
|
|
|
@ -221,11 +221,6 @@ typedef struct _DbeScreenPrivRec
|
|||
void (*ResetProc)(
|
||||
ScreenPtr /*pScreen*/
|
||||
);
|
||||
void (*ValidateBuffer)(
|
||||
WindowPtr /*pWin*/,
|
||||
XID /*bufId*/,
|
||||
Bool /*dstbuffer*/
|
||||
);
|
||||
|
||||
/* Device-specific private information.
|
||||
*/
|
||||
|
|
25
dbe/midbe.c
25
dbe/midbe.c
|
@ -59,21 +59,12 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
/* DEFINES */
|
||||
|
||||
|
||||
/* TYPEDEFS */
|
||||
|
||||
|
||||
/* GLOBALS */
|
||||
|
||||
static int miDbePrivPrivGeneration = 0;
|
||||
static int miDbeWindowPrivPrivIndex = -1;
|
||||
RESTYPE dbeDrawableResType;
|
||||
RESTYPE dbeWindowPrivResType;
|
||||
int dbeScreenPrivIndex = -1;
|
||||
int dbeWindowPrivIndex = -1;
|
||||
|
||||
static RESTYPE dbeDrawableResType;
|
||||
static RESTYPE dbeWindowPrivResType;
|
||||
static int dbeScreenPrivIndex = -1;
|
||||
static int dbeWindowPrivIndex = -1;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -768,11 +759,6 @@ miDbeResetProc(ScreenPtr pScreen)
|
|||
|
||||
} /* miDbeResetProc() */
|
||||
|
||||
static void
|
||||
miDbeNopValidateBuffer(WindowPtr pWin, XID bufId, Bool dstbuffer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
|
@ -830,9 +816,6 @@ miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv)
|
|||
pDbeScreenPriv->ResetProc = miDbeResetProc;
|
||||
pDbeScreenPriv->WinPrivDelete = miDbeWinPrivDelete;
|
||||
|
||||
/* The mi implementation doesn't need buffer validation. */
|
||||
pDbeScreenPriv->ValidateBuffer = miDbeNopValidateBuffer;
|
||||
|
||||
return(TRUE);
|
||||
|
||||
} /* miDbeInit() */
|
||||
|
|
|
@ -77,10 +77,10 @@ void FreeAtom(NodePtr patom);
|
|||
_X_EXPORT Atom
|
||||
MakeAtom(char *string, unsigned len, Bool makeit)
|
||||
{
|
||||
register NodePtr * np;
|
||||
NodePtr * np;
|
||||
unsigned i;
|
||||
int comp;
|
||||
register unsigned int fp = 0;
|
||||
int comp;
|
||||
unsigned int fp = 0;
|
||||
|
||||
np = &atomRoot;
|
||||
for (i = 0; i < (len+1)/2; i++)
|
||||
|
@ -107,7 +107,7 @@ MakeAtom(char *string, unsigned len, Bool makeit)
|
|||
}
|
||||
if (makeit)
|
||||
{
|
||||
register NodePtr nd;
|
||||
NodePtr nd;
|
||||
|
||||
nd = (NodePtr) xalloc(sizeof(NodeRec));
|
||||
if (!nd)
|
||||
|
|
|
@ -95,8 +95,8 @@ static int BlueComp(
|
|||
);
|
||||
|
||||
static void FreePixels(
|
||||
register ColormapPtr /*pmap*/,
|
||||
register int /*client*/
|
||||
ColormapPtr /*pmap*/,
|
||||
int /*client*/
|
||||
);
|
||||
|
||||
static void CopyFree(
|
||||
|
@ -259,9 +259,9 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
|
|||
int class, size;
|
||||
unsigned long sizebytes;
|
||||
ColormapPtr pmap;
|
||||
register EntryPtr pent;
|
||||
EntryPtr pent;
|
||||
int i;
|
||||
register Pixel *ppix, **pptr;
|
||||
Pixel *ppix, **pptr;
|
||||
|
||||
class = pVisual->class;
|
||||
if(!(class & DynamicClass) && (alloc != AllocNone) && (client != SERVER_ID))
|
||||
|
@ -428,8 +428,8 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
|
|||
int
|
||||
FreeColormap (pointer value, XID mid)
|
||||
{
|
||||
int i;
|
||||
register EntryPtr pent;
|
||||
int i;
|
||||
EntryPtr pent;
|
||||
ColormapPtr pmap = (ColormapPtr)value;
|
||||
|
||||
if(CLIENT_ID(mid) != SERVER_ID)
|
||||
|
@ -744,9 +744,9 @@ static void
|
|||
UpdateColors (ColormapPtr pmap)
|
||||
{
|
||||
xColorItem *defs;
|
||||
register xColorItem *pdef;
|
||||
register EntryPtr pent;
|
||||
register VisualPtr pVisual;
|
||||
xColorItem *pdef;
|
||||
EntryPtr pent;
|
||||
VisualPtr pVisual;
|
||||
int i, n, size;
|
||||
|
||||
pVisual = pmap->pVisual;
|
||||
|
@ -993,14 +993,14 @@ AllocColor (ColormapPtr pmap,
|
|||
*/
|
||||
|
||||
_X_EXPORT void
|
||||
FakeAllocColor (register ColormapPtr pmap, register xColorItem *item)
|
||||
FakeAllocColor (ColormapPtr pmap, xColorItem *item)
|
||||
{
|
||||
Pixel pixR, pixG, pixB;
|
||||
Pixel temp;
|
||||
int entries;
|
||||
xrgb rgb;
|
||||
int class;
|
||||
register VisualPtr pVisual;
|
||||
Pixel pixR, pixG, pixB;
|
||||
Pixel temp;
|
||||
int entries;
|
||||
xrgb rgb;
|
||||
int class;
|
||||
VisualPtr pVisual;
|
||||
|
||||
pVisual = pmap->pVisual;
|
||||
rgb.red = item->red;
|
||||
|
@ -1059,9 +1059,9 @@ FakeAllocColor (register ColormapPtr pmap, register xColorItem *item)
|
|||
|
||||
/* free a pixel value obtained from FakeAllocColor */
|
||||
_X_EXPORT void
|
||||
FakeFreeColor(register ColormapPtr pmap, Pixel pixel)
|
||||
FakeFreeColor(ColormapPtr pmap, Pixel pixel)
|
||||
{
|
||||
register VisualPtr pVisual;
|
||||
VisualPtr pVisual;
|
||||
Pixel pixR, pixG, pixB;
|
||||
|
||||
switch (pmap->class) {
|
||||
|
@ -1507,11 +1507,11 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList)
|
|||
}
|
||||
|
||||
static void
|
||||
FreePixels(register ColormapPtr pmap, register int client)
|
||||
FreePixels(ColormapPtr pmap, int client)
|
||||
{
|
||||
register Pixel *ppix, *ppixStart;
|
||||
register int n;
|
||||
int class;
|
||||
Pixel *ppix, *ppixStart;
|
||||
int n;
|
||||
int class;
|
||||
|
||||
class = pmap->class;
|
||||
ppixStart = pmap->clientPixelsRed[client];
|
||||
|
@ -1646,8 +1646,8 @@ AllocColorPlanes (int client, ColormapPtr pmap, int colors,
|
|||
{
|
||||
int ok;
|
||||
Pixel mask, *ppixFirst;
|
||||
register Pixel shift;
|
||||
register int i;
|
||||
Pixel shift;
|
||||
int i;
|
||||
int class;
|
||||
int oldcount;
|
||||
colorResource *pcr = (colorResource *)NULL;
|
||||
|
@ -2409,10 +2409,10 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
|
|||
_X_EXPORT int
|
||||
StoreColors (ColormapPtr pmap, int count, xColorItem *defs)
|
||||
{
|
||||
register Pixel pix;
|
||||
register xColorItem *pdef;
|
||||
register EntryPtr pent, pentT, pentLast;
|
||||
register VisualPtr pVisual;
|
||||
Pixel pix;
|
||||
xColorItem *pdef;
|
||||
EntryPtr pent, pentT, pentLast;
|
||||
VisualPtr pVisual;
|
||||
SHAREDCOLOR *pred, *pgreen, *pblue;
|
||||
int n, ChgRed, ChgGreen, ChgBlue, idef;
|
||||
int class, errVal = Success;
|
||||
|
|
|
@ -86,7 +86,7 @@ FreeCursorBits(CursorBitsPtr bits)
|
|||
#endif
|
||||
if (bits->refcnt == 0)
|
||||
{
|
||||
register GlyphSharePtr *prev, this;
|
||||
GlyphSharePtr *prev, this;
|
||||
|
||||
for (prev = &sharedGlyphs;
|
||||
(this = *prev) && (this->bits != bits);
|
||||
|
@ -135,7 +135,7 @@ FreeCursor(pointer value, XID cid)
|
|||
static void
|
||||
CheckForEmptyMask(CursorBitsPtr bits)
|
||||
{
|
||||
register unsigned char *msk = bits->mask;
|
||||
unsigned char *msk = bits->mask;
|
||||
int n = BitmapBytePad(bits->width) * bits->height;
|
||||
|
||||
bits->emptyMask = FALSE;
|
||||
|
@ -305,8 +305,8 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
|
|||
}
|
||||
if (!maskfont)
|
||||
{
|
||||
register long n;
|
||||
register unsigned char *mskptr;
|
||||
long n;
|
||||
unsigned char *mskptr;
|
||||
|
||||
n = BitmapBytePad(cm.width)*(long)cm.height;
|
||||
mskptr = mskbits = (unsigned char *)xalloc(n);
|
||||
|
|
|
@ -67,7 +67,7 @@ SOFTWARE.
|
|||
#define XKB_IN_SERVER
|
||||
#endif
|
||||
#ifdef XKB
|
||||
#include <X11/extensions/XKBsrv.h>
|
||||
#include <xkbsrv.h>
|
||||
#endif
|
||||
#include "xace.h"
|
||||
|
||||
|
@ -79,12 +79,13 @@ SOFTWARE.
|
|||
#include "exglobals.h"
|
||||
#include "exevents.h"
|
||||
|
||||
int CoreDevicePrivatesIndex = 0, CoreDevicePrivatesGeneration = -1;
|
||||
int CoreDevicePrivatesIndex = 0;
|
||||
static int CoreDevicePrivatesGeneration = -1;
|
||||
|
||||
DeviceIntPtr
|
||||
AddInputDevice(DeviceProc deviceProc, Bool autoStart)
|
||||
{
|
||||
register DeviceIntPtr dev, *prev; /* not a typo */
|
||||
DeviceIntPtr dev, *prev; /* not a typo */
|
||||
|
||||
if (inputInfo.numDevices >= MAX_DEVICES)
|
||||
return (DeviceIntPtr)NULL;
|
||||
|
@ -140,9 +141,9 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart)
|
|||
}
|
||||
|
||||
Bool
|
||||
EnableDevice(register DeviceIntPtr dev)
|
||||
EnableDevice(DeviceIntPtr dev)
|
||||
{
|
||||
register DeviceIntPtr *prev;
|
||||
DeviceIntPtr *prev;
|
||||
int ret;
|
||||
|
||||
for (prev = &inputInfo.off_devices;
|
||||
|
@ -166,9 +167,9 @@ EnableDevice(register DeviceIntPtr dev)
|
|||
}
|
||||
|
||||
Bool
|
||||
DisableDevice(register DeviceIntPtr dev)
|
||||
DisableDevice(DeviceIntPtr dev)
|
||||
{
|
||||
register DeviceIntPtr *prev;
|
||||
DeviceIntPtr *prev;
|
||||
|
||||
for (prev = &inputInfo.devices;
|
||||
*prev && (*prev != dev);
|
||||
|
@ -238,7 +239,7 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what)
|
|||
keySyms.mapWidth = 4;
|
||||
keySyms.map = (KeySym *)xcalloc(sizeof(KeySym),
|
||||
(keySyms.maxKeyCode -
|
||||
keySyms.minKeyCode) *
|
||||
keySyms.minKeyCode + 1) *
|
||||
keySyms.mapWidth);
|
||||
if (!keySyms.map) {
|
||||
ErrorF("Couldn't allocate core keymap\n");
|
||||
|
@ -315,7 +316,7 @@ CorePointerProc(DeviceIntPtr pDev, int what)
|
|||
void
|
||||
InitCoreDevices()
|
||||
{
|
||||
register DeviceIntPtr dev;
|
||||
DeviceIntPtr dev;
|
||||
|
||||
if (CoreDevicePrivatesGeneration != serverGeneration) {
|
||||
CoreDevicePrivatesIndex = AllocateDevicePrivateIndex();
|
||||
|
@ -374,7 +375,7 @@ InitCoreDevices()
|
|||
int
|
||||
InitAndStartDevices()
|
||||
{
|
||||
register DeviceIntPtr dev, next;
|
||||
DeviceIntPtr dev, next;
|
||||
|
||||
for (dev = inputInfo.off_devices; dev; dev = dev->next) {
|
||||
DebugF("(dix) initialising device %d\n", dev->id);
|
||||
|
@ -406,7 +407,7 @@ InitAndStartDevices()
|
|||
}
|
||||
|
||||
static void
|
||||
CloseDevice(register DeviceIntPtr dev)
|
||||
CloseDevice(DeviceIntPtr dev)
|
||||
{
|
||||
KbdFeedbackPtr k, knext;
|
||||
PtrFeedbackPtr p, pnext;
|
||||
|
@ -494,6 +495,9 @@ CloseDevice(register DeviceIntPtr dev)
|
|||
XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource);
|
||||
#endif
|
||||
|
||||
if (dev->devPrivates)
|
||||
xfree(dev->devPrivates);
|
||||
|
||||
xfree(dev->sync.event);
|
||||
xfree(dev);
|
||||
}
|
||||
|
@ -501,7 +505,7 @@ CloseDevice(register DeviceIntPtr dev)
|
|||
void
|
||||
CloseDownDevices()
|
||||
{
|
||||
register DeviceIntPtr dev, next;
|
||||
DeviceIntPtr dev, next;
|
||||
|
||||
for (dev = inputInfo.devices; dev; dev = next)
|
||||
{
|
||||
|
@ -631,7 +635,7 @@ QueryMinMaxKeyCodes(KeyCode *minCode, KeyCode *maxCode)
|
|||
}
|
||||
|
||||
Bool
|
||||
SetKeySymsMap(register KeySymsPtr dst, register KeySymsPtr src)
|
||||
SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src)
|
||||
{
|
||||
int i, j;
|
||||
int rowDif = src->minKeyCode - dst->minKeyCode;
|
||||
|
@ -680,7 +684,7 @@ SetKeySymsMap(register KeySymsPtr dst, register KeySymsPtr src)
|
|||
}
|
||||
|
||||
static Bool
|
||||
InitModMap(register KeyClassPtr keyc)
|
||||
InitModMap(KeyClassPtr keyc)
|
||||
{
|
||||
int i, j;
|
||||
CARD8 keysPerModifier[8];
|
||||
|
@ -725,7 +729,7 @@ _X_EXPORT Bool
|
|||
InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers[])
|
||||
{
|
||||
int i;
|
||||
register KeyClassPtr keyc;
|
||||
KeyClassPtr keyc;
|
||||
|
||||
keyc = (KeyClassPtr)xalloc(sizeof(KeyClassRec));
|
||||
if (!keyc)
|
||||
|
@ -760,10 +764,10 @@ InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers
|
|||
}
|
||||
|
||||
_X_EXPORT Bool
|
||||
InitButtonClassDeviceStruct(register DeviceIntPtr dev, int numButtons,
|
||||
InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons,
|
||||
CARD8 *map)
|
||||
{
|
||||
register ButtonClassPtr butc;
|
||||
ButtonClassPtr butc;
|
||||
int i;
|
||||
|
||||
butc = (ButtonClassPtr)xalloc(sizeof(ButtonClassRec));
|
||||
|
@ -789,7 +793,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
|
|||
int numMotionEvents, int mode)
|
||||
{
|
||||
int i;
|
||||
register ValuatorClassPtr valc;
|
||||
ValuatorClassPtr valc;
|
||||
|
||||
if (!dev)
|
||||
return FALSE;
|
||||
|
@ -831,7 +835,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
|
|||
_X_EXPORT Bool
|
||||
InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
|
||||
{
|
||||
register AbsoluteClassPtr abs;
|
||||
AbsoluteClassPtr abs;
|
||||
|
||||
abs = (AbsoluteClassPtr)xalloc(sizeof(AbsoluteClassRec));
|
||||
if (!abs)
|
||||
|
@ -861,7 +865,7 @@ InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
|
|||
_X_EXPORT Bool
|
||||
InitFocusClassDeviceStruct(DeviceIntPtr dev)
|
||||
{
|
||||
register FocusClassPtr focc;
|
||||
FocusClassPtr focc;
|
||||
|
||||
focc = (FocusClassPtr)xalloc(sizeof(FocusClassRec));
|
||||
if (!focc)
|
||||
|
@ -880,7 +884,7 @@ _X_EXPORT Bool
|
|||
InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc,
|
||||
KbdCtrlProcPtr controlProc)
|
||||
{
|
||||
register KbdFeedbackPtr feedc;
|
||||
KbdFeedbackPtr feedc;
|
||||
|
||||
feedc = (KbdFeedbackPtr)xalloc(sizeof(KbdFeedbackClassRec));
|
||||
if (!feedc)
|
||||
|
@ -907,7 +911,7 @@ InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc,
|
|||
_X_EXPORT Bool
|
||||
InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
|
||||
{
|
||||
register PtrFeedbackPtr feedc;
|
||||
PtrFeedbackPtr feedc;
|
||||
|
||||
feedc = (PtrFeedbackPtr)xalloc(sizeof(PtrFeedbackClassRec));
|
||||
if (!feedc)
|
||||
|
@ -923,16 +927,16 @@ InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
|
|||
}
|
||||
|
||||
|
||||
LedCtrl defaultLedControl = {
|
||||
static LedCtrl defaultLedControl = {
|
||||
DEFAULT_LEDS, DEFAULT_LEDS_MASK, 0};
|
||||
|
||||
BellCtrl defaultBellControl = {
|
||||
static BellCtrl defaultBellControl = {
|
||||
DEFAULT_BELL,
|
||||
DEFAULT_BELL_PITCH,
|
||||
DEFAULT_BELL_DURATION,
|
||||
0};
|
||||
|
||||
IntegerCtrl defaultIntegerControl = {
|
||||
static IntegerCtrl defaultIntegerControl = {
|
||||
DEFAULT_INT_RESOLUTION,
|
||||
DEFAULT_INT_MIN_VALUE,
|
||||
DEFAULT_INT_MAX_VALUE,
|
||||
|
@ -945,7 +949,7 @@ InitStringFeedbackClassDeviceStruct (
|
|||
int max_symbols, int num_symbols_supported, KeySym *symbols)
|
||||
{
|
||||
int i;
|
||||
register StringFeedbackPtr feedc;
|
||||
StringFeedbackPtr feedc;
|
||||
|
||||
feedc = (StringFeedbackPtr)xalloc(sizeof(StringFeedbackClassRec));
|
||||
if (!feedc)
|
||||
|
@ -983,7 +987,7 @@ _X_EXPORT Bool
|
|||
InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc,
|
||||
BellCtrlProcPtr controlProc)
|
||||
{
|
||||
register BellFeedbackPtr feedc;
|
||||
BellFeedbackPtr feedc;
|
||||
|
||||
feedc = (BellFeedbackPtr)xalloc(sizeof(BellFeedbackClassRec));
|
||||
if (!feedc)
|
||||
|
@ -1002,7 +1006,7 @@ InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc,
|
|||
_X_EXPORT Bool
|
||||
InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc)
|
||||
{
|
||||
register LedFeedbackPtr feedc;
|
||||
LedFeedbackPtr feedc;
|
||||
|
||||
feedc = (LedFeedbackPtr)xalloc(sizeof(LedFeedbackClassRec));
|
||||
if (!feedc)
|
||||
|
@ -1023,7 +1027,7 @@ InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc)
|
|||
_X_EXPORT Bool
|
||||
InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev, IntegerCtrlProcPtr controlProc)
|
||||
{
|
||||
register IntegerFeedbackPtr feedc;
|
||||
IntegerFeedbackPtr feedc;
|
||||
|
||||
feedc = (IntegerFeedbackPtr)xalloc(sizeof(IntegerFeedbackClassRec));
|
||||
if (!feedc)
|
||||
|
@ -1109,9 +1113,9 @@ SendMappingNotify(unsigned request, unsigned firstKeyCode, unsigned count,
|
|||
* sort it to do the checking. How often is it called? Just being lazy?
|
||||
*/
|
||||
Bool
|
||||
BadDeviceMap(register BYTE *buff, int length, unsigned low, unsigned high, XID *errval)
|
||||
BadDeviceMap(BYTE *buff, int length, unsigned low, unsigned high, XID *errval)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
if (buff[i]) /* only check non-zero elements */
|
||||
|
@ -1133,12 +1137,12 @@ BadDeviceMap(register BYTE *buff, int length, unsigned low, unsigned high, XID *
|
|||
|
||||
Bool
|
||||
AllModifierKeysAreUp(dev, map1, per1, map2, per2)
|
||||
register DeviceIntPtr dev;
|
||||
register CARD8 *map1, *map2;
|
||||
DeviceIntPtr dev;
|
||||
CARD8 *map1, *map2;
|
||||
int per1, per2;
|
||||
{
|
||||
register int i, j, k;
|
||||
register CARD8 *down = dev->key->down;
|
||||
int i, j, k;
|
||||
CARD8 *down = dev->key->down;
|
||||
|
||||
for (i = 8; --i >= 0; map2 += per2)
|
||||
{
|
||||
|
@ -1255,7 +1259,7 @@ int
|
|||
ProcGetModifierMapping(ClientPtr client)
|
||||
{
|
||||
xGetModifierMappingReply rep;
|
||||
register KeyClassPtr keyc = inputInfo.keyboard->key;
|
||||
KeyClassPtr keyc = inputInfo.keyboard->key;
|
||||
|
||||
REQUEST_SIZE_MATCH(xReq);
|
||||
rep.type = X_Reply;
|
||||
|
@ -1456,7 +1460,7 @@ NoteLedState(DeviceIntPtr keybd, int led, Bool on)
|
|||
_X_EXPORT int
|
||||
Ones(unsigned long mask) /* HACKMEM 169 */
|
||||
{
|
||||
register unsigned long y;
|
||||
unsigned long y;
|
||||
|
||||
y = (mask >> 1) &033333333333;
|
||||
y = mask - y - ((y >>1) & 033333333333);
|
||||
|
@ -1673,7 +1677,7 @@ int
|
|||
ProcGetKeyboardControl (ClientPtr client)
|
||||
{
|
||||
int i;
|
||||
register KeybdCtrl *ctrl = &inputInfo.keyboard->kbdfeed->ctrl;
|
||||
KeybdCtrl *ctrl = &inputInfo.keyboard->kbdfeed->ctrl;
|
||||
xGetKeyboardControlReply rep;
|
||||
|
||||
REQUEST_SIZE_MATCH(xReq);
|
||||
|
@ -1695,7 +1699,7 @@ ProcGetKeyboardControl (ClientPtr client)
|
|||
int
|
||||
ProcBell(ClientPtr client)
|
||||
{
|
||||
register DeviceIntPtr keybd = inputInfo.keyboard;
|
||||
DeviceIntPtr keybd = inputInfo.keyboard;
|
||||
int base = keybd->kbdfeed->ctrl.bell;
|
||||
int newpercent;
|
||||
REQUEST(xBellReq);
|
||||
|
@ -1804,7 +1808,7 @@ ProcChangePointerControl(ClientPtr client)
|
|||
int
|
||||
ProcGetPointerControl(ClientPtr client)
|
||||
{
|
||||
register PtrCtrl *ctrl = &inputInfo.pointer->ptrfeed->ctrl;
|
||||
PtrCtrl *ctrl = &inputInfo.pointer->ptrfeed->ctrl;
|
||||
xGetPointerControlReply rep;
|
||||
|
||||
REQUEST_SIZE_MATCH(xReq);
|
||||
|
@ -1819,7 +1823,7 @@ ProcGetPointerControl(ClientPtr client)
|
|||
}
|
||||
|
||||
void
|
||||
MaybeStopHint(register DeviceIntPtr dev, ClientPtr client)
|
||||
MaybeStopHint(DeviceIntPtr dev, ClientPtr client)
|
||||
{
|
||||
GrabPtr grab = dev->grab;
|
||||
|
||||
|
|
305
dix/dispatch.c
305
dix/dispatch.c
|
@ -143,7 +143,7 @@ int ProcInitialConnection();
|
|||
#define XKB_IN_SERVER
|
||||
#endif
|
||||
#include "inputstr.h"
|
||||
#include <X11/extensions/XKBsrv.h>
|
||||
#include <xkbsrv.h>
|
||||
#endif
|
||||
|
||||
#ifdef XSERVER_DTRACE
|
||||
|
@ -262,7 +262,7 @@ void
|
|||
FlushClientCaches(XID id)
|
||||
{
|
||||
int i;
|
||||
register ClientPtr client;
|
||||
ClientPtr client;
|
||||
|
||||
client = clients[CLIENT_ID(id)];
|
||||
if (client == NullClient)
|
||||
|
@ -297,9 +297,8 @@ long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL;
|
|||
long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL;
|
||||
long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE;
|
||||
long SmartScheduleTime;
|
||||
ClientPtr SmartLastClient;
|
||||
int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1];
|
||||
int SmartScheduleClient(int *clientReady, int nready);
|
||||
static ClientPtr SmartLastClient;
|
||||
static int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1];
|
||||
|
||||
#ifdef SMART_DEBUG
|
||||
long SmartLastPrint;
|
||||
|
@ -308,7 +307,7 @@ long SmartLastPrint;
|
|||
void Dispatch(void);
|
||||
void InitProcVectors(void);
|
||||
|
||||
int
|
||||
static int
|
||||
SmartScheduleClient (int *clientReady, int nready)
|
||||
{
|
||||
ClientPtr pClient;
|
||||
|
@ -394,11 +393,11 @@ SmartScheduleClient (int *clientReady, int nready)
|
|||
void
|
||||
Dispatch(void)
|
||||
{
|
||||
register int *clientReady; /* array of request ready clients */
|
||||
register int result;
|
||||
register ClientPtr client;
|
||||
register int nready;
|
||||
register HWEventQueuePtr* icheck = checkForInput;
|
||||
int *clientReady; /* array of request ready clients */
|
||||
int result;
|
||||
ClientPtr client;
|
||||
int nready;
|
||||
HWEventQueuePtr* icheck = checkForInput;
|
||||
#ifdef SMART_SCHEDULE
|
||||
long start_tick;
|
||||
#endif
|
||||
|
@ -594,11 +593,11 @@ ProcCreateWindow(ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcChangeWindowAttributes(register ClientPtr client)
|
||||
ProcChangeWindowAttributes(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xChangeWindowAttributesReq);
|
||||
register int result;
|
||||
int result;
|
||||
int len, rc;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
|
||||
|
@ -619,7 +618,7 @@ ProcChangeWindowAttributes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcGetWindowAttributes(register ClientPtr client)
|
||||
ProcGetWindowAttributes(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -636,7 +635,7 @@ ProcGetWindowAttributes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcDestroyWindow(register ClientPtr client)
|
||||
ProcDestroyWindow(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -652,7 +651,7 @@ ProcDestroyWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcDestroySubwindows(register ClientPtr client)
|
||||
ProcDestroySubwindows(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -667,11 +666,11 @@ ProcDestroySubwindows(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcChangeSaveSet(register ClientPtr client)
|
||||
ProcChangeSaveSet(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xChangeSaveSetReq);
|
||||
register int result, rc;
|
||||
int result, rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xChangeSaveSetReq);
|
||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
|
||||
|
@ -695,11 +694,11 @@ ProcChangeSaveSet(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcReparentWindow(register ClientPtr client)
|
||||
ProcReparentWindow(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin, pParent;
|
||||
REQUEST(xReparentWindowReq);
|
||||
register int result, rc;
|
||||
int result, rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xReparentWindowReq);
|
||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
|
||||
|
@ -728,7 +727,7 @@ ProcReparentWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcMapWindow(register ClientPtr client)
|
||||
ProcMapWindow(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -744,7 +743,7 @@ ProcMapWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcMapSubwindows(register ClientPtr client)
|
||||
ProcMapSubwindows(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -760,7 +759,7 @@ ProcMapSubwindows(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcUnmapWindow(register ClientPtr client)
|
||||
ProcUnmapWindow(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -776,7 +775,7 @@ ProcUnmapWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcUnmapSubwindows(register ClientPtr client)
|
||||
ProcUnmapSubwindows(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -791,11 +790,11 @@ ProcUnmapSubwindows(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcConfigureWindow(register ClientPtr client)
|
||||
ProcConfigureWindow(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xConfigureWindowReq);
|
||||
register int result;
|
||||
int result;
|
||||
int len, rc;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
|
||||
|
@ -814,7 +813,7 @@ ProcConfigureWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCirculateWindow(register ClientPtr client)
|
||||
ProcCirculateWindow(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xCirculateWindowReq);
|
||||
|
@ -834,8 +833,8 @@ ProcCirculateWindow(register ClientPtr client)
|
|||
return(client->noClientException);
|
||||
}
|
||||
|
||||
int
|
||||
GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
|
||||
static int
|
||||
GetGeometry(ClientPtr client, xGetGeometryReply *rep)
|
||||
{
|
||||
DrawablePtr pDraw;
|
||||
int rc;
|
||||
|
@ -865,7 +864,7 @@ GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
|
|||
if ((pDraw->type == UNDRAWABLE_WINDOW) ||
|
||||
((pDraw->type == DRAWABLE_WINDOW) && (stuff->id == pDraw->id)))
|
||||
{
|
||||
register WindowPtr pWin = (WindowPtr)pDraw;
|
||||
WindowPtr pWin = (WindowPtr)pDraw;
|
||||
rep->x = pWin->origin.x - wBorderWidth (pWin);
|
||||
rep->y = pWin->origin.y - wBorderWidth (pWin);
|
||||
rep->borderWidth = pWin->borderWidth;
|
||||
|
@ -880,7 +879,7 @@ GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
|
|||
|
||||
|
||||
int
|
||||
ProcGetGeometry(register ClientPtr client)
|
||||
ProcGetGeometry(ClientPtr client)
|
||||
{
|
||||
xGetGeometryReply rep;
|
||||
int status;
|
||||
|
@ -894,7 +893,7 @@ ProcGetGeometry(register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
ProcQueryTree(register ClientPtr client)
|
||||
ProcQueryTree(ClientPtr client)
|
||||
{
|
||||
xQueryTreeReply reply;
|
||||
int rc, numChildren = 0;
|
||||
|
@ -942,7 +941,7 @@ ProcQueryTree(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcInternAtom(register ClientPtr client)
|
||||
ProcInternAtom(ClientPtr client)
|
||||
{
|
||||
Atom atom;
|
||||
char *tchar;
|
||||
|
@ -971,7 +970,7 @@ ProcInternAtom(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcGetAtomName(register ClientPtr client)
|
||||
ProcGetAtomName(ClientPtr client)
|
||||
{
|
||||
char *str;
|
||||
xGetAtomNameReply reply;
|
||||
|
@ -1002,7 +1001,7 @@ extern int k5_bad();
|
|||
#endif
|
||||
|
||||
int
|
||||
ProcSetSelectionOwner(register ClientPtr client)
|
||||
ProcSetSelectionOwner(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
TimeStamp time;
|
||||
|
@ -1097,7 +1096,7 @@ ProcSetSelectionOwner(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcGetSelectionOwner(register ClientPtr client)
|
||||
ProcGetSelectionOwner(ClientPtr client)
|
||||
{
|
||||
REQUEST(xResourceReq);
|
||||
|
||||
|
@ -1128,7 +1127,7 @@ ProcGetSelectionOwner(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcConvertSelection(register ClientPtr client)
|
||||
ProcConvertSelection(ClientPtr client)
|
||||
{
|
||||
Bool paramsOkay;
|
||||
xEvent event;
|
||||
|
@ -1188,7 +1187,7 @@ ProcConvertSelection(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcGrabServer(register ClientPtr client)
|
||||
ProcGrabServer(ClientPtr client)
|
||||
{
|
||||
REQUEST_SIZE_MATCH(xReq);
|
||||
if (grabState != GrabNone && client != grabClient)
|
||||
|
@ -1242,7 +1241,7 @@ UngrabServer(ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcUngrabServer(register ClientPtr client)
|
||||
ProcUngrabServer(ClientPtr client)
|
||||
{
|
||||
REQUEST_SIZE_MATCH(xReq);
|
||||
UngrabServer(client);
|
||||
|
@ -1250,7 +1249,7 @@ ProcUngrabServer(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcTranslateCoords(register ClientPtr client)
|
||||
ProcTranslateCoords(ClientPtr client)
|
||||
{
|
||||
REQUEST(xTranslateCoordsReq);
|
||||
|
||||
|
@ -1327,7 +1326,7 @@ ProcTranslateCoords(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcOpenFont(register ClientPtr client)
|
||||
ProcOpenFont(ClientPtr client)
|
||||
{
|
||||
int err;
|
||||
REQUEST(xOpenFontReq);
|
||||
|
@ -1346,7 +1345,7 @@ ProcOpenFont(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCloseFont(register ClientPtr client)
|
||||
ProcCloseFont(ClientPtr client)
|
||||
{
|
||||
FontPtr pFont;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -1367,11 +1366,11 @@ ProcCloseFont(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcQueryFont(register ClientPtr client)
|
||||
ProcQueryFont(ClientPtr client)
|
||||
{
|
||||
xQueryFontReply *reply;
|
||||
FontPtr pFont;
|
||||
register GC *pGC;
|
||||
GC *pGC;
|
||||
REQUEST(xResourceReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xResourceReq);
|
||||
|
@ -1425,7 +1424,7 @@ ProcQueryFont(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcQueryTextExtents(register ClientPtr client)
|
||||
ProcQueryTextExtents(ClientPtr client)
|
||||
{
|
||||
REQUEST(xQueryTextExtentsReq);
|
||||
xQueryTextExtentsReply reply;
|
||||
|
@ -1475,7 +1474,7 @@ ProcQueryTextExtents(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcListFonts(register ClientPtr client)
|
||||
ProcListFonts(ClientPtr client)
|
||||
{
|
||||
REQUEST(xListFontsReq);
|
||||
|
||||
|
@ -1486,7 +1485,7 @@ ProcListFonts(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcListFontsWithInfo(register ClientPtr client)
|
||||
ProcListFontsWithInfo(ClientPtr client)
|
||||
{
|
||||
REQUEST(xListFontsWithInfoReq);
|
||||
|
||||
|
@ -1508,13 +1507,13 @@ dixDestroyPixmap(pointer value, XID pid)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCreatePixmap(register ClientPtr client)
|
||||
ProcCreatePixmap(ClientPtr client)
|
||||
{
|
||||
PixmapPtr pMap;
|
||||
DrawablePtr pDraw;
|
||||
REQUEST(xCreatePixmapReq);
|
||||
DepthPtr pDepth;
|
||||
register int i, rc;
|
||||
int i, rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xCreatePixmapReq);
|
||||
client->errorValue = stuff->pid;
|
||||
|
@ -1571,7 +1570,7 @@ CreatePmap:
|
|||
}
|
||||
|
||||
int
|
||||
ProcFreePixmap(register ClientPtr client)
|
||||
ProcFreePixmap(ClientPtr client)
|
||||
{
|
||||
PixmapPtr pMap;
|
||||
|
||||
|
@ -1593,7 +1592,7 @@ ProcFreePixmap(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCreateGC(register ClientPtr client)
|
||||
ProcCreateGC(ClientPtr client)
|
||||
{
|
||||
int error, rc;
|
||||
GC *pGC;
|
||||
|
@ -1621,7 +1620,7 @@ ProcCreateGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcChangeGC(register ClientPtr client)
|
||||
ProcChangeGC(ClientPtr client)
|
||||
{
|
||||
GC *pGC;
|
||||
int result;
|
||||
|
@ -1648,7 +1647,7 @@ ProcChangeGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCopyGC(register ClientPtr client)
|
||||
ProcCopyGC(ClientPtr client)
|
||||
{
|
||||
GC *dstGC;
|
||||
GC *pGC;
|
||||
|
@ -1675,7 +1674,7 @@ ProcCopyGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcSetDashes(register ClientPtr client)
|
||||
ProcSetDashes(ClientPtr client)
|
||||
{
|
||||
GC *pGC;
|
||||
int result;
|
||||
|
@ -1704,7 +1703,7 @@ ProcSetDashes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcSetClipRectangles(register ClientPtr client)
|
||||
ProcSetClipRectangles(ClientPtr client)
|
||||
{
|
||||
int nr, result;
|
||||
GC *pGC;
|
||||
|
@ -1734,7 +1733,7 @@ ProcSetClipRectangles(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcFreeGC(register ClientPtr client)
|
||||
ProcFreeGC(ClientPtr client)
|
||||
{
|
||||
GC *pGC;
|
||||
int rc;
|
||||
|
@ -1750,7 +1749,7 @@ ProcFreeGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcClearToBackground(register ClientPtr client)
|
||||
ProcClearToBackground(ClientPtr client)
|
||||
{
|
||||
REQUEST(xClearAreaReq);
|
||||
WindowPtr pWin;
|
||||
|
@ -1777,7 +1776,7 @@ ProcClearToBackground(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCopyArea(register ClientPtr client)
|
||||
ProcCopyArea(ClientPtr client)
|
||||
{
|
||||
DrawablePtr pDst;
|
||||
DrawablePtr pSrc;
|
||||
|
@ -1804,8 +1803,6 @@ ProcCopyArea(register ClientPtr client)
|
|||
else
|
||||
pSrc = pDst;
|
||||
|
||||
SET_DBE_SRCBUF(pSrc, stuff->srcDrawable);
|
||||
|
||||
pRgn = (*pGC->ops->CopyArea)(pSrc, pDst, pGC, stuff->srcX, stuff->srcY,
|
||||
stuff->width, stuff->height,
|
||||
stuff->dstX, stuff->dstY);
|
||||
|
@ -1821,7 +1818,7 @@ ProcCopyArea(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCopyPlane(register ClientPtr client)
|
||||
ProcCopyPlane(ClientPtr client)
|
||||
{
|
||||
DrawablePtr psrcDraw, pdstDraw;
|
||||
GC *pGC;
|
||||
|
@ -1848,8 +1845,6 @@ ProcCopyPlane(register ClientPtr client)
|
|||
else
|
||||
psrcDraw = pdstDraw;
|
||||
|
||||
SET_DBE_SRCBUF(psrcDraw, stuff->srcDrawable);
|
||||
|
||||
/* Check to see if stuff->bitPlane has exactly ONE good bit set */
|
||||
if(stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) ||
|
||||
(stuff->bitPlane > (1L << (psrcDraw->depth - 1))))
|
||||
|
@ -1872,7 +1867,7 @@ ProcCopyPlane(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyPoint(register ClientPtr client)
|
||||
ProcPolyPoint(ClientPtr client)
|
||||
{
|
||||
int npoint;
|
||||
GC *pGC;
|
||||
|
@ -1895,7 +1890,7 @@ ProcPolyPoint(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyLine(register ClientPtr client)
|
||||
ProcPolyLine(ClientPtr client)
|
||||
{
|
||||
int npoint;
|
||||
GC *pGC;
|
||||
|
@ -1918,7 +1913,7 @@ ProcPolyLine(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolySegment(register ClientPtr client)
|
||||
ProcPolySegment(ClientPtr client)
|
||||
{
|
||||
int nsegs;
|
||||
GC *pGC;
|
||||
|
@ -1937,7 +1932,7 @@ ProcPolySegment(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyRectangle (register ClientPtr client)
|
||||
ProcPolyRectangle (ClientPtr client)
|
||||
{
|
||||
int nrects;
|
||||
GC *pGC;
|
||||
|
@ -1957,7 +1952,7 @@ ProcPolyRectangle (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyArc(register ClientPtr client)
|
||||
ProcPolyArc(ClientPtr client)
|
||||
{
|
||||
int narcs;
|
||||
GC *pGC;
|
||||
|
@ -1976,7 +1971,7 @@ ProcPolyArc(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcFillPoly(register ClientPtr client)
|
||||
ProcFillPoly(ClientPtr client)
|
||||
{
|
||||
int things;
|
||||
GC *pGC;
|
||||
|
@ -2007,7 +2002,7 @@ ProcFillPoly(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyFillRectangle(register ClientPtr client)
|
||||
ProcPolyFillRectangle(ClientPtr client)
|
||||
{
|
||||
int things;
|
||||
GC *pGC;
|
||||
|
@ -2028,7 +2023,7 @@ ProcPolyFillRectangle(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyFillArc(register ClientPtr client)
|
||||
ProcPolyFillArc(ClientPtr client)
|
||||
{
|
||||
int narcs;
|
||||
GC *pGC;
|
||||
|
@ -2101,7 +2096,7 @@ ReformatImage (char *base, int nbytes, int bpp, int order)
|
|||
* boundary, even if the scanlines are padded to our satisfaction.
|
||||
*/
|
||||
int
|
||||
ProcPutImage(register ClientPtr client)
|
||||
ProcPutImage(ClientPtr client)
|
||||
{
|
||||
GC *pGC;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -2157,15 +2152,14 @@ ProcPutImage(register ClientPtr client)
|
|||
return (client->noClientException);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
||||
static int
|
||||
DoGetImage(ClientPtr client, int format, Drawable drawable,
|
||||
int x, int y, int width, int height,
|
||||
Mask planemask, xGetImageReply **im_return)
|
||||
{
|
||||
DrawablePtr pDraw;
|
||||
int nlines, linesPerBuf, rc;
|
||||
register int linesDone;
|
||||
int linesDone;
|
||||
long widthBytesLine, length;
|
||||
Mask plane = 0;
|
||||
char *pBuf;
|
||||
|
@ -2210,8 +2204,6 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
|||
xgi.visual = None;
|
||||
}
|
||||
|
||||
SET_DBE_SRCBUF(pDraw, drawable);
|
||||
|
||||
xgi.type = X_Reply;
|
||||
xgi.sequenceNumber = client->sequence;
|
||||
xgi.depth = pDraw->depth;
|
||||
|
@ -2379,7 +2371,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
|||
}
|
||||
|
||||
int
|
||||
ProcGetImage(register ClientPtr client)
|
||||
ProcGetImage(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetImageReq);
|
||||
|
||||
|
@ -2392,7 +2384,7 @@ ProcGetImage(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyText(register ClientPtr client)
|
||||
ProcPolyText(ClientPtr client)
|
||||
{
|
||||
int err;
|
||||
REQUEST(xPolyTextReq);
|
||||
|
@ -2421,7 +2413,7 @@ ProcPolyText(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcImageText8(register ClientPtr client)
|
||||
ProcImageText8(ClientPtr client)
|
||||
{
|
||||
int err;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -2451,7 +2443,7 @@ ProcImageText8(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcImageText16(register ClientPtr client)
|
||||
ProcImageText16(ClientPtr client)
|
||||
{
|
||||
int err;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -2482,7 +2474,7 @@ ProcImageText16(register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
ProcCreateColormap(register ClientPtr client)
|
||||
ProcCreateColormap(ClientPtr client)
|
||||
{
|
||||
VisualPtr pVisual;
|
||||
ColormapPtr pmap;
|
||||
|
@ -2524,7 +2516,7 @@ ProcCreateColormap(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcFreeColormap(register ClientPtr client)
|
||||
ProcFreeColormap(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pmap;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -2548,7 +2540,7 @@ ProcFreeColormap(register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
ProcCopyColormapAndFree(register ClientPtr client)
|
||||
ProcCopyColormapAndFree(ClientPtr client)
|
||||
{
|
||||
Colormap mid;
|
||||
ColormapPtr pSrcMap;
|
||||
|
@ -2575,7 +2567,7 @@ ProcCopyColormapAndFree(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcInstallColormap(register ClientPtr client)
|
||||
ProcInstallColormap(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -2596,7 +2588,7 @@ ProcInstallColormap(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcUninstallColormap(register ClientPtr client)
|
||||
ProcUninstallColormap(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -2618,7 +2610,7 @@ ProcUninstallColormap(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcListInstalledColormaps(register ClientPtr client)
|
||||
ProcListInstalledColormaps(ClientPtr client)
|
||||
{
|
||||
xListInstalledColormapsReply *preply;
|
||||
int nummaps, rc;
|
||||
|
@ -2651,7 +2643,7 @@ ProcListInstalledColormaps(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcAllocColor (register ClientPtr client)
|
||||
ProcAllocColor (ClientPtr client)
|
||||
{
|
||||
ColormapPtr pmap;
|
||||
int retval;
|
||||
|
@ -2693,7 +2685,7 @@ ProcAllocColor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcAllocNamedColor (register ClientPtr client)
|
||||
ProcAllocNamedColor (ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xAllocNamedColorReq);
|
||||
|
@ -2745,7 +2737,7 @@ ProcAllocNamedColor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcAllocColorCells (register ClientPtr client)
|
||||
ProcAllocColorCells (ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xAllocColorCellsReq);
|
||||
|
@ -2811,7 +2803,7 @@ ProcAllocColorCells (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcAllocColorPlanes(register ClientPtr client)
|
||||
ProcAllocColorPlanes(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xAllocColorPlanesReq);
|
||||
|
@ -2875,7 +2867,7 @@ ProcAllocColorPlanes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcFreeColors(register ClientPtr client)
|
||||
ProcFreeColors(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xFreeColorsReq);
|
||||
|
@ -2944,7 +2936,7 @@ ProcStoreColors (ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcStoreNamedColor (register ClientPtr client)
|
||||
ProcStoreNamedColor (ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xStoreNamedColorReq);
|
||||
|
@ -2978,7 +2970,7 @@ ProcStoreNamedColor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcQueryColors(register ClientPtr client)
|
||||
ProcQueryColors(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xQueryColorsReq);
|
||||
|
@ -3029,7 +3021,7 @@ ProcQueryColors(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcLookupColor(register ClientPtr client)
|
||||
ProcLookupColor(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xLookupColorReq);
|
||||
|
@ -3067,17 +3059,16 @@ ProcLookupColor(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCreateCursor (register ClientPtr client)
|
||||
ProcCreateCursor (ClientPtr client)
|
||||
{
|
||||
CursorPtr pCursor;
|
||||
|
||||
register PixmapPtr src;
|
||||
register PixmapPtr msk;
|
||||
CursorPtr pCursor;
|
||||
PixmapPtr src;
|
||||
PixmapPtr msk;
|
||||
unsigned char * srcbits;
|
||||
unsigned char * mskbits;
|
||||
unsigned short width, height;
|
||||
long n;
|
||||
CursorMetricRec cm;
|
||||
CursorMetricRec cm;
|
||||
|
||||
|
||||
REQUEST(xCreateCursorReq);
|
||||
|
@ -3132,7 +3123,7 @@ ProcCreateCursor (register ClientPtr client)
|
|||
XYPixmap, 1, (pointer)srcbits);
|
||||
if ( msk == (PixmapPtr)NULL)
|
||||
{
|
||||
register unsigned char *bits = mskbits;
|
||||
unsigned char *bits = mskbits;
|
||||
while (--n >= 0)
|
||||
*bits++ = ~0;
|
||||
}
|
||||
|
@ -3157,7 +3148,7 @@ ProcCreateCursor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCreateGlyphCursor (register ClientPtr client)
|
||||
ProcCreateGlyphCursor (ClientPtr client)
|
||||
{
|
||||
CursorPtr pCursor;
|
||||
int res;
|
||||
|
@ -3181,7 +3172,7 @@ ProcCreateGlyphCursor (register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
ProcFreeCursor (register ClientPtr client)
|
||||
ProcFreeCursor (ClientPtr client)
|
||||
{
|
||||
CursorPtr pCursor;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -3202,7 +3193,7 @@ ProcFreeCursor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcQueryBestSize (register ClientPtr client)
|
||||
ProcQueryBestSize (ClientPtr client)
|
||||
{
|
||||
xQueryBestSizeReply reply;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -3239,7 +3230,7 @@ ProcQueryBestSize (register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
ProcSetScreenSaver (register ClientPtr client)
|
||||
ProcSetScreenSaver (ClientPtr client)
|
||||
{
|
||||
int blankingOption, exposureOption;
|
||||
REQUEST(xSetScreenSaverReq);
|
||||
|
@ -3295,7 +3286,7 @@ ProcSetScreenSaver (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcGetScreenSaver(register ClientPtr client)
|
||||
ProcGetScreenSaver(ClientPtr client)
|
||||
{
|
||||
xGetScreenSaverReply rep;
|
||||
|
||||
|
@ -3312,7 +3303,7 @@ ProcGetScreenSaver(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcChangeHosts(register ClientPtr client)
|
||||
ProcChangeHosts(ClientPtr client)
|
||||
{
|
||||
REQUEST(xChangeHostsReq);
|
||||
int result;
|
||||
|
@ -3336,7 +3327,7 @@ ProcChangeHosts(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcListHosts(register ClientPtr client)
|
||||
ProcListHosts(ClientPtr client)
|
||||
{
|
||||
xListHostsReply reply;
|
||||
int len, nHosts, result;
|
||||
|
@ -3367,7 +3358,7 @@ ProcListHosts(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcChangeAccessControl(register ClientPtr client)
|
||||
ProcChangeAccessControl(ClientPtr client)
|
||||
{
|
||||
int result;
|
||||
REQUEST(xSetAccessControlReq);
|
||||
|
@ -3384,8 +3375,30 @@ ProcChangeAccessControl(register ClientPtr client)
|
|||
return (result);
|
||||
}
|
||||
|
||||
/*********************
|
||||
* CloseDownRetainedResources
|
||||
*
|
||||
* Find all clients that are gone and have terminated in RetainTemporary
|
||||
* and destroy their resources.
|
||||
*********************/
|
||||
|
||||
static void
|
||||
CloseDownRetainedResources(void)
|
||||
{
|
||||
int i;
|
||||
ClientPtr client;
|
||||
|
||||
for (i=1; i<currentMaxClients; i++)
|
||||
{
|
||||
client = clients[i];
|
||||
if (client && (client->closeDownMode == RetainTemporary)
|
||||
&& (client->clientGone))
|
||||
CloseDownClient(client);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ProcKillClient(register ClientPtr client)
|
||||
ProcKillClient(ClientPtr client)
|
||||
{
|
||||
REQUEST(xResourceReq);
|
||||
ClientPtr killclient;
|
||||
|
@ -3417,7 +3430,7 @@ ProcKillClient(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcSetFontPath(register ClientPtr client)
|
||||
ProcSetFontPath(ClientPtr client)
|
||||
{
|
||||
unsigned char *ptr;
|
||||
unsigned long nbytes, total;
|
||||
|
@ -3452,7 +3465,7 @@ ProcSetFontPath(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcGetFontPath(register ClientPtr client)
|
||||
ProcGetFontPath(ClientPtr client)
|
||||
{
|
||||
xGetFontPathReply reply;
|
||||
int stringLens, numpaths;
|
||||
|
@ -3474,7 +3487,7 @@ ProcGetFontPath(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcChangeCloseDownMode(register ClientPtr client)
|
||||
ProcChangeCloseDownMode(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSetCloseDownModeReq);
|
||||
|
||||
|
@ -3493,7 +3506,7 @@ ProcChangeCloseDownMode(register ClientPtr client)
|
|||
}
|
||||
}
|
||||
|
||||
int ProcForceScreenSaver(register ClientPtr client)
|
||||
int ProcForceScreenSaver(ClientPtr client)
|
||||
{
|
||||
REQUEST(xForceScreenSaverReq);
|
||||
|
||||
|
@ -3509,7 +3522,7 @@ int ProcForceScreenSaver(register ClientPtr client)
|
|||
return client->noClientException;
|
||||
}
|
||||
|
||||
int ProcNoOperation(register ClientPtr client)
|
||||
int ProcNoOperation(ClientPtr client)
|
||||
{
|
||||
REQUEST_AT_LEAST_SIZE(xReq);
|
||||
|
||||
|
@ -3552,7 +3565,7 @@ InitProcVectors(void)
|
|||
char dispatchExceptionAtReset = DE_RESET;
|
||||
|
||||
void
|
||||
CloseDownClient(register ClientPtr client)
|
||||
CloseDownClient(ClientPtr client)
|
||||
{
|
||||
Bool really_close_down = client->clientGone ||
|
||||
client->closeDownMode == DestroyAll;
|
||||
|
@ -3652,28 +3665,6 @@ KillAllClients()
|
|||
}
|
||||
}
|
||||
|
||||
/*********************
|
||||
* CloseDownRetainedResources
|
||||
*
|
||||
* Find all clients that are gone and have terminated in RetainTemporary
|
||||
* and destroy their resources.
|
||||
*********************/
|
||||
|
||||
void
|
||||
CloseDownRetainedResources()
|
||||
{
|
||||
register int i;
|
||||
register ClientPtr client;
|
||||
|
||||
for (i=1; i<currentMaxClients; i++)
|
||||
{
|
||||
client = clients[i];
|
||||
if (client && (client->closeDownMode == RetainTemporary)
|
||||
&& (client->clientGone))
|
||||
CloseDownClient(client);
|
||||
}
|
||||
}
|
||||
|
||||
extern int clientPrivateLen;
|
||||
extern unsigned *clientPrivateSizes;
|
||||
extern unsigned totalClientSize;
|
||||
|
@ -3733,11 +3724,11 @@ void InitClient(ClientPtr client, int i, pointer ospriv)
|
|||
int
|
||||
InitClientPrivates(ClientPtr client)
|
||||
{
|
||||
register char *ptr;
|
||||
char *ptr;
|
||||
DevUnion *ppriv;
|
||||
register unsigned *sizes;
|
||||
register unsigned size;
|
||||
register int i;
|
||||
unsigned *sizes;
|
||||
unsigned size;
|
||||
int i;
|
||||
|
||||
if (totalClientSize == sizeof(ClientRec))
|
||||
ppriv = (DevUnion *)NULL;
|
||||
|
@ -3787,8 +3778,8 @@ InitClientPrivates(ClientPtr client)
|
|||
|
||||
ClientPtr NextAvailableClient(pointer ospriv)
|
||||
{
|
||||
register int i;
|
||||
register ClientPtr client;
|
||||
int i;
|
||||
ClientPtr client;
|
||||
xReq data;
|
||||
|
||||
i = nextFreeClientID;
|
||||
|
@ -3829,10 +3820,10 @@ ClientPtr NextAvailableClient(pointer ospriv)
|
|||
}
|
||||
|
||||
int
|
||||
ProcInitialConnection(register ClientPtr client)
|
||||
ProcInitialConnection(ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
register xConnClientPrefix *prefix;
|
||||
xConnClientPrefix *prefix;
|
||||
int whichbyte = 1;
|
||||
|
||||
prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
|
||||
|
@ -3856,10 +3847,10 @@ ProcInitialConnection(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SendConnSetup(register ClientPtr client, char *reason)
|
||||
SendConnSetup(ClientPtr client, char *reason)
|
||||
{
|
||||
register xWindowRoot *root;
|
||||
register int i;
|
||||
xWindowRoot *root;
|
||||
int i;
|
||||
int numScreens;
|
||||
char* lConnectionInfo;
|
||||
xConnSetupPrefix* lconnSetupPrefix;
|
||||
|
@ -3914,8 +3905,8 @@ SendConnSetup(register ClientPtr client, char *reason)
|
|||
|
||||
for (i=0; i<numScreens; i++)
|
||||
{
|
||||
register unsigned int j;
|
||||
register xDepth *pDepth;
|
||||
unsigned int j;
|
||||
xDepth *pDepth;
|
||||
|
||||
root->currentInputMask = WindowTable[i]->eventMask |
|
||||
wOtherEventMasks (WindowTable[i]);
|
||||
|
@ -3956,10 +3947,10 @@ SendConnSetup(register ClientPtr client, char *reason)
|
|||
}
|
||||
|
||||
int
|
||||
ProcEstablishConnection(register ClientPtr client)
|
||||
ProcEstablishConnection(ClientPtr client)
|
||||
{
|
||||
char *reason, *auth_proto, *auth_string;
|
||||
register xConnClientPrefix *prefix;
|
||||
xConnClientPrefix *prefix;
|
||||
REQUEST(xReq);
|
||||
|
||||
prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
|
||||
|
@ -4008,7 +3999,7 @@ SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode,
|
|||
void
|
||||
DeleteWindowFromAnySelections(WindowPtr pWin)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i< NumCurrentSelections; i++)
|
||||
if (CurrentSelections[i].pWin == pWin)
|
||||
|
@ -4030,7 +4021,7 @@ DeleteWindowFromAnySelections(WindowPtr pWin)
|
|||
static void
|
||||
DeleteClientFromAnySelections(ClientPtr client)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i< NumCurrentSelections; i++)
|
||||
if (CurrentSelections[i].client == client)
|
||||
|
|
|
@ -64,6 +64,7 @@ Equipment Corporation.
|
|||
#include "opaque.h"
|
||||
#include "dixfontstr.h"
|
||||
#include "closestr.h"
|
||||
#include "dixfont.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#include <stdio.h>
|
||||
|
@ -1144,9 +1145,9 @@ static XID clearGC[] = { CT_NONE };
|
|||
#define clearGCmask (GCClipMask)
|
||||
|
||||
int
|
||||
doPolyText(ClientPtr client, register PTclosurePtr c)
|
||||
doPolyText(ClientPtr client, PTclosurePtr c)
|
||||
{
|
||||
register FontPtr pFont = c->pGC->font, oldpFont;
|
||||
FontPtr pFont = c->pGC->font, oldpFont;
|
||||
Font fid, oldfid;
|
||||
int err = Success, lgerr; /* err is in X error, not font error, space */
|
||||
enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT;
|
||||
|
@ -1446,7 +1447,7 @@ PolyText(ClientPtr client, DrawablePtr pDraw, GC *pGC, unsigned char *pElt,
|
|||
#undef FontShiftSize
|
||||
|
||||
int
|
||||
doImageText(ClientPtr client, register ITclosurePtr c)
|
||||
doImageText(ClientPtr client, ITclosurePtr c)
|
||||
{
|
||||
int err = Success, lgerr; /* err is in X error, not font error, space */
|
||||
FontPathElementPtr fpe;
|
||||
|
|
|
@ -168,7 +168,7 @@ ISOLatin1ToLower (unsigned char source)
|
|||
_X_EXPORT void
|
||||
CopyISOLatin1Lowered(unsigned char *dest, unsigned char *source, int length)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < length; i++, source++, dest++)
|
||||
*dest = ISOLatin1ToLower (*source);
|
||||
|
@ -392,8 +392,8 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode,
|
|||
void
|
||||
DeleteWindowFromAnySaveSet(WindowPtr pWin)
|
||||
{
|
||||
register int i;
|
||||
register ClientPtr client;
|
||||
int i;
|
||||
ClientPtr client;
|
||||
|
||||
for (i = 0; i< currentMaxClients; i++)
|
||||
{
|
||||
|
@ -434,7 +434,7 @@ static Bool handlerDeleted;
|
|||
void
|
||||
BlockHandler(pointer pTimeout, pointer pReadmask)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
++inHandler;
|
||||
for (i = 0; i < screenInfo.numScreens; i++)
|
||||
|
@ -468,7 +468,7 @@ BlockHandler(pointer pTimeout, pointer pReadmask)
|
|||
void
|
||||
WakeupHandler(int result, pointer pReadmask)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
++inHandler;
|
||||
for (i = numHandlers - 1; i >= 0; i--)
|
||||
|
@ -882,9 +882,7 @@ static CallbackFuncsRec default_cbfuncs =
|
|||
_DeleteCallbackList
|
||||
};
|
||||
|
||||
/* ===== Public Procedures ===== */
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
|
||||
{
|
||||
CallbackListPtr cbl;
|
||||
|
@ -916,6 +914,8 @@ CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* ===== Public Procedures ===== */
|
||||
|
||||
_X_EXPORT Bool
|
||||
AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
|
||||
{
|
||||
|
|
192
dix/events.c
192
dix/events.c
|
@ -133,7 +133,7 @@ of the copyright holder.
|
|||
|
||||
#ifdef XKB
|
||||
#include <X11/extensions/XKBproto.h>
|
||||
#include <X11/extensions/XKBsrv.h>
|
||||
#include <xkbsrv.h>
|
||||
extern Bool XkbFilterEvents(ClientPtr, int, xEvent *);
|
||||
#endif
|
||||
|
||||
|
@ -156,7 +156,7 @@ extern Mask xevieFilters[128];
|
|||
extern int xevieEventSent;
|
||||
extern int xevieKBEventSent;
|
||||
int xeviegrabState = 0;
|
||||
xEvent *xeviexE;
|
||||
static xEvent *xeviexE;
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/XIproto.h>
|
||||
|
@ -761,8 +761,8 @@ CheckPhysLimits(
|
|||
|
||||
static void
|
||||
CheckVirtualMotion(
|
||||
register QdEventPtr qe,
|
||||
register WindowPtr pWin)
|
||||
QdEventPtr qe,
|
||||
WindowPtr pWin)
|
||||
{
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
|
@ -875,7 +875,7 @@ ChangeToCursor(CursorPtr cursor)
|
|||
|
||||
/* returns true if b is a descendent of a */
|
||||
Bool
|
||||
IsParent(register WindowPtr a, register WindowPtr b)
|
||||
IsParent(WindowPtr a, WindowPtr b)
|
||||
{
|
||||
for (b = b->parent; b; b = b->parent)
|
||||
if (b == a) return TRUE;
|
||||
|
@ -885,8 +885,8 @@ IsParent(register WindowPtr a, register WindowPtr b)
|
|||
static void
|
||||
PostNewCursor(void)
|
||||
{
|
||||
register WindowPtr win;
|
||||
register GrabPtr grab = inputInfo.pointer->grab;
|
||||
WindowPtr win;
|
||||
GrabPtr grab = inputInfo.pointer->grab;
|
||||
|
||||
if (syncEvents.playingEvents)
|
||||
return;
|
||||
|
@ -952,7 +952,7 @@ XineramaGetCursorScreen()
|
|||
#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */
|
||||
|
||||
static void
|
||||
MonthChangedOrBadTime(register xEvent *xE)
|
||||
MonthChangedOrBadTime(xEvent *xE)
|
||||
{
|
||||
/* If the ddx/OS is careless about not processing timestamped events from
|
||||
* different sources in sorted order, then it's possible for time to go
|
||||
|
@ -971,7 +971,7 @@ MonthChangedOrBadTime(register xEvent *xE)
|
|||
lastDeviceEventTime = currentTime; }
|
||||
|
||||
void
|
||||
NoticeEventTime(register xEvent *xE)
|
||||
NoticeEventTime(xEvent *xE)
|
||||
{
|
||||
if (!syncEvents.playingEvents)
|
||||
NoticeTime(xE);
|
||||
|
@ -984,8 +984,8 @@ NoticeEventTime(register xEvent *xE)
|
|||
void
|
||||
EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count)
|
||||
{
|
||||
register QdEventPtr tail = *syncEvents.pendtail;
|
||||
register QdEventPtr qe;
|
||||
QdEventPtr tail = *syncEvents.pendtail;
|
||||
QdEventPtr qe;
|
||||
xEvent *qxE;
|
||||
|
||||
NoticeTime(xE);
|
||||
|
@ -1059,8 +1059,8 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count)
|
|||
static void
|
||||
PlayReleasedEvents(void)
|
||||
{
|
||||
register QdEventPtr *prev, qe;
|
||||
register DeviceIntPtr dev;
|
||||
QdEventPtr *prev, qe;
|
||||
DeviceIntPtr dev;
|
||||
|
||||
prev = &syncEvents.pending;
|
||||
while ( (qe = *prev) )
|
||||
|
@ -1104,7 +1104,7 @@ PlayReleasedEvents(void)
|
|||
}
|
||||
|
||||
static void
|
||||
FreezeThaw(register DeviceIntPtr dev, Bool frozen)
|
||||
FreezeThaw(DeviceIntPtr dev, Bool frozen)
|
||||
{
|
||||
dev->sync.frozen = frozen;
|
||||
if (frozen)
|
||||
|
@ -1116,13 +1116,13 @@ FreezeThaw(register DeviceIntPtr dev, Bool frozen)
|
|||
void
|
||||
ComputeFreezes()
|
||||
{
|
||||
register DeviceIntPtr replayDev = syncEvents.replayDev;
|
||||
register int i;
|
||||
DeviceIntPtr replayDev = syncEvents.replayDev;
|
||||
int i;
|
||||
WindowPtr w;
|
||||
register xEvent *xE;
|
||||
xEvent *xE;
|
||||
int count;
|
||||
GrabPtr grab;
|
||||
register DeviceIntPtr dev;
|
||||
DeviceIntPtr dev;
|
||||
|
||||
for (dev = inputInfo.devices; dev; dev = dev->next)
|
||||
FreezeThaw(dev, dev->sync.other || (dev->sync.state >= FROZEN));
|
||||
|
@ -1198,10 +1198,10 @@ ScreenRestructured (ScreenPtr pScreen)
|
|||
#endif
|
||||
|
||||
void
|
||||
CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
|
||||
CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
|
||||
{
|
||||
register GrabPtr grab = thisDev->grab;
|
||||
register DeviceIntPtr dev;
|
||||
GrabPtr grab = thisDev->grab;
|
||||
DeviceIntPtr dev;
|
||||
|
||||
if (thisMode == GrabModeSync)
|
||||
thisDev->sync.state = FROZEN_NO_EVENT;
|
||||
|
@ -1232,7 +1232,7 @@ CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
|
|||
}
|
||||
|
||||
void
|
||||
ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
|
||||
ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab,
|
||||
TimeStamp time, Bool autoGrab)
|
||||
{
|
||||
WindowPtr oldWin = (mouse->grab) ? mouse->grab->window
|
||||
|
@ -1260,10 +1260,10 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
|
|||
}
|
||||
|
||||
void
|
||||
DeactivatePointerGrab(register DeviceIntPtr mouse)
|
||||
DeactivatePointerGrab(DeviceIntPtr mouse)
|
||||
{
|
||||
register GrabPtr grab = mouse->grab;
|
||||
register DeviceIntPtr dev;
|
||||
GrabPtr grab = mouse->grab;
|
||||
DeviceIntPtr dev;
|
||||
|
||||
mouse->valuator->motionHintWindow = NullWindow;
|
||||
mouse->grab = NullGrab;
|
||||
|
@ -1284,7 +1284,7 @@ DeactivatePointerGrab(register DeviceIntPtr mouse)
|
|||
}
|
||||
|
||||
void
|
||||
ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive)
|
||||
ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive)
|
||||
{
|
||||
WindowPtr oldWin;
|
||||
|
||||
|
@ -1310,11 +1310,11 @@ ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time,
|
|||
}
|
||||
|
||||
void
|
||||
DeactivateKeyboardGrab(register DeviceIntPtr keybd)
|
||||
DeactivateKeyboardGrab(DeviceIntPtr keybd)
|
||||
{
|
||||
register GrabPtr grab = keybd->grab;
|
||||
register DeviceIntPtr dev;
|
||||
register WindowPtr focusWin = keybd->focus ? keybd->focus->win
|
||||
GrabPtr grab = keybd->grab;
|
||||
DeviceIntPtr dev;
|
||||
WindowPtr focusWin = keybd->focus ? keybd->focus->win
|
||||
: sprite.win;
|
||||
|
||||
if (focusWin == FollowKeyboardWin)
|
||||
|
@ -1338,7 +1338,7 @@ AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState)
|
|||
{
|
||||
Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced;
|
||||
TimeStamp grabTime;
|
||||
register DeviceIntPtr dev;
|
||||
DeviceIntPtr dev;
|
||||
|
||||
thisGrabbed = thisDev->grab && SameClient(thisDev->grab, client);
|
||||
thisSynced = FALSE;
|
||||
|
@ -1442,7 +1442,7 @@ AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState)
|
|||
}
|
||||
|
||||
int
|
||||
ProcAllowEvents(register ClientPtr client)
|
||||
ProcAllowEvents(ClientPtr client)
|
||||
{
|
||||
TimeStamp time;
|
||||
DeviceIntPtr mouse = inputInfo.pointer;
|
||||
|
@ -1487,7 +1487,7 @@ ProcAllowEvents(register ClientPtr client)
|
|||
void
|
||||
ReleaseActiveGrabs(ClientPtr client)
|
||||
{
|
||||
register DeviceIntPtr dev;
|
||||
DeviceIntPtr dev;
|
||||
Bool done;
|
||||
|
||||
/* XXX CloseDownClient should remove passive grabs before
|
||||
|
@ -1589,12 +1589,12 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
|
|||
}
|
||||
|
||||
int
|
||||
DeliverEventsToWindow(register WindowPtr pWin, xEvent *pEvents, int count,
|
||||
DeliverEventsToWindow(WindowPtr pWin, xEvent *pEvents, int count,
|
||||
Mask filter, GrabPtr grab, int mskidx)
|
||||
{
|
||||
int deliveries = 0, nondeliveries = 0;
|
||||
int attempt;
|
||||
register InputClients *other;
|
||||
InputClients *other;
|
||||
ClientPtr client = NullClient;
|
||||
Mask deliveryMask = 0; /* If a grab occurs due to a button press, then
|
||||
this mask is the mask of the grab. */
|
||||
|
@ -1708,10 +1708,10 @@ XineramaTryClientEventsResult(
|
|||
#endif
|
||||
|
||||
int
|
||||
MaybeDeliverEventsToClient(register WindowPtr pWin, xEvent *pEvents,
|
||||
MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents,
|
||||
int count, Mask filter, ClientPtr dontClient)
|
||||
{
|
||||
register OtherClients *other;
|
||||
OtherClients *other;
|
||||
|
||||
|
||||
if (pWin->eventMask & filter)
|
||||
|
@ -1799,8 +1799,8 @@ FixUpEventFromWindow(
|
|||
}
|
||||
|
||||
int
|
||||
DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab,
|
||||
register WindowPtr stopAt, DeviceIntPtr dev, int count)
|
||||
DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab,
|
||||
WindowPtr stopAt, DeviceIntPtr dev, int count)
|
||||
{
|
||||
Window child = None;
|
||||
int type = xE->u.u.type;
|
||||
|
@ -1809,7 +1809,7 @@ DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab,
|
|||
|
||||
if (type & EXTENSION_EVENT_BASE)
|
||||
{
|
||||
register OtherInputMasks *inputMasks;
|
||||
OtherInputMasks *inputMasks;
|
||||
int mskidx = dev->id;
|
||||
|
||||
inputMasks = wOtherInputMasks(pWin);
|
||||
|
@ -1863,8 +1863,8 @@ DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab,
|
|||
|
||||
/* not useful for events that propagate up the tree or extension events */
|
||||
_X_EXPORT int
|
||||
DeliverEvents(register WindowPtr pWin, register xEvent *xE, int count,
|
||||
register WindowPtr otherParent)
|
||||
DeliverEvents(WindowPtr pWin, xEvent *xE, int count,
|
||||
WindowPtr otherParent)
|
||||
{
|
||||
Mask filter;
|
||||
int deliveries;
|
||||
|
@ -1929,7 +1929,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
|
|||
static WindowPtr
|
||||
XYToWindow(int x, int y)
|
||||
{
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
BoxRec box;
|
||||
|
||||
spriteTraceGood = 1; /* root window still there */
|
||||
|
@ -2092,9 +2092,9 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
|
|||
#endif
|
||||
|
||||
void
|
||||
DefineInitialRootWindow(register WindowPtr win)
|
||||
DefineInitialRootWindow(WindowPtr win)
|
||||
{
|
||||
register ScreenPtr pScreen = win->drawable.pScreen;
|
||||
ScreenPtr pScreen = win->drawable.pScreen;
|
||||
|
||||
sprite.hotPhys.pScreen = pScreen;
|
||||
sprite.hotPhys.x = pScreen->width / 2;
|
||||
|
@ -2411,13 +2411,13 @@ BorderSizeNotEmpty(WindowPtr pWin)
|
|||
static Bool
|
||||
CheckPassiveGrabsOnWindow(
|
||||
WindowPtr pWin,
|
||||
register DeviceIntPtr device,
|
||||
register xEvent *xE,
|
||||
DeviceIntPtr device,
|
||||
xEvent *xE,
|
||||
int count)
|
||||
{
|
||||
register GrabPtr grab = wPassiveGrabs(pWin);
|
||||
GrabPtr grab = wPassiveGrabs(pWin);
|
||||
GrabRec tempGrab;
|
||||
register xEvent *dxE;
|
||||
xEvent *dxE;
|
||||
|
||||
if (!grab)
|
||||
return FALSE;
|
||||
|
@ -2513,12 +2513,12 @@ tried. PRH
|
|||
*/
|
||||
|
||||
Bool
|
||||
CheckDeviceGrabs(register DeviceIntPtr device, register xEvent *xE,
|
||||
CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE,
|
||||
int checkFirst, int count)
|
||||
{
|
||||
register int i;
|
||||
register WindowPtr pWin = NULL;
|
||||
register FocusClassPtr focus = device->focus;
|
||||
int i;
|
||||
WindowPtr pWin = NULL;
|
||||
FocusClassPtr focus = device->focus;
|
||||
|
||||
if (((xE->u.u.type == ButtonPress)
|
||||
#if defined(XINPUT) && defined(XKB)
|
||||
|
@ -2585,13 +2585,13 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count)
|
|||
}
|
||||
|
||||
void
|
||||
DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev,
|
||||
DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev,
|
||||
Bool deactivateGrab, int count)
|
||||
{
|
||||
register GrabPtr grab = thisDev->grab;
|
||||
GrabPtr grab = thisDev->grab;
|
||||
int deliveries = 0;
|
||||
register DeviceIntPtr dev;
|
||||
register xEvent *dxE;
|
||||
DeviceIntPtr dev;
|
||||
xEvent *dxE;
|
||||
|
||||
if (grab->ownerEvents)
|
||||
{
|
||||
|
@ -2668,19 +2668,19 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev,
|
|||
|
||||
void
|
||||
#ifdef XKB
|
||||
CoreProcessKeyboardEvent (register xEvent *xE, register DeviceIntPtr keybd, int count)
|
||||
CoreProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count)
|
||||
#else
|
||||
ProcessKeyboardEvent (register xEvent *xE, register DeviceIntPtr keybd, int count)
|
||||
ProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count)
|
||||
#endif
|
||||
{
|
||||
int key, bit;
|
||||
register BYTE *kptr;
|
||||
register int i;
|
||||
register CARD8 modifiers;
|
||||
register CARD16 mask;
|
||||
BYTE *kptr;
|
||||
int i;
|
||||
CARD8 modifiers;
|
||||
CARD16 mask;
|
||||
GrabPtr grab = keybd->grab;
|
||||
Bool deactivateGrab = FALSE;
|
||||
register KeyClassPtr keyc = keybd->key;
|
||||
KeyClassPtr keyc = keybd->key;
|
||||
#ifdef XEVIE
|
||||
static Window rootWin = 0;
|
||||
|
||||
|
@ -2832,11 +2832,11 @@ drawable.id:0;
|
|||
CoreProcessKeyEvent to be called, as in for example Mouse Keys.
|
||||
*/
|
||||
void
|
||||
FixKeyState (register xEvent *xE, register DeviceIntPtr keybd)
|
||||
FixKeyState (xEvent *xE, DeviceIntPtr keybd)
|
||||
{
|
||||
int key, bit;
|
||||
register BYTE *kptr;
|
||||
register KeyClassPtr keyc = keybd->key;
|
||||
BYTE *kptr;
|
||||
KeyClassPtr keyc = keybd->key;
|
||||
|
||||
key = xE->u.u.detail;
|
||||
kptr = &keyc->down[key >> 3];
|
||||
|
@ -2863,14 +2863,14 @@ FixKeyState (register xEvent *xE, register DeviceIntPtr keybd)
|
|||
|
||||
void
|
||||
#ifdef XKB
|
||||
CoreProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count)
|
||||
CoreProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
|
||||
#else
|
||||
ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count)
|
||||
ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
|
||||
#endif
|
||||
{
|
||||
register GrabPtr grab = mouse->grab;
|
||||
GrabPtr grab = mouse->grab;
|
||||
Bool deactivateGrab = FALSE;
|
||||
register ButtonClassPtr butc = mouse->button;
|
||||
ButtonClassPtr butc = mouse->button;
|
||||
#ifdef XKB
|
||||
XkbSrvInfoPtr xkbi= inputInfo.keyboard->key->xkbInfo;
|
||||
#endif
|
||||
|
@ -2914,8 +2914,8 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count
|
|||
}
|
||||
if (xE->u.u.type != MotionNotify)
|
||||
{
|
||||
register int key;
|
||||
register BYTE *kptr;
|
||||
int key;
|
||||
BYTE *kptr;
|
||||
int bit;
|
||||
|
||||
XE_KBPTR.rootX = sprite.hot.x;
|
||||
|
@ -2976,10 +2976,10 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count
|
|||
|
||||
void
|
||||
RecalculateDeliverableEvents(pWin)
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register OtherClients *others;
|
||||
register WindowPtr pChild;
|
||||
OtherClients *others;
|
||||
WindowPtr pChild;
|
||||
|
||||
pChild = pWin;
|
||||
while (1)
|
||||
|
@ -3018,8 +3018,8 @@ RecalculateDeliverableEvents(pWin)
|
|||
int
|
||||
OtherClientGone(pointer value, XID id)
|
||||
{
|
||||
register OtherClientsPtr other, prev;
|
||||
register WindowPtr pWin = (WindowPtr)value;
|
||||
OtherClientsPtr other, prev;
|
||||
WindowPtr pWin = (WindowPtr)value;
|
||||
|
||||
prev = 0;
|
||||
for (other = wOtherClients(pWin); other; other = other->next)
|
||||
|
@ -3045,7 +3045,7 @@ OtherClientGone(pointer value, XID id)
|
|||
}
|
||||
|
||||
int
|
||||
EventSelectForWindow(register WindowPtr pWin, register ClientPtr client, Mask mask)
|
||||
EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask)
|
||||
{
|
||||
Mask check;
|
||||
OtherClients * others;
|
||||
|
@ -3117,10 +3117,10 @@ maskSet:
|
|||
}
|
||||
|
||||
int
|
||||
EventSuppressForWindow(register WindowPtr pWin, register ClientPtr client,
|
||||
EventSuppressForWindow(WindowPtr pWin, ClientPtr client,
|
||||
Mask mask, Bool *checkOptional)
|
||||
{
|
||||
register int i, free;
|
||||
int i, free;
|
||||
|
||||
if (mask & ~PropagateMask)
|
||||
{
|
||||
|
@ -3174,8 +3174,8 @@ EventSuppressForWindow(register WindowPtr pWin, register ClientPtr client,
|
|||
|
||||
static WindowPtr
|
||||
CommonAncestor(
|
||||
register WindowPtr a,
|
||||
register WindowPtr b)
|
||||
WindowPtr a,
|
||||
WindowPtr b)
|
||||
{
|
||||
for (b = b->parent; b; b = b->parent)
|
||||
if (IsParent(b, a)) return b;
|
||||
|
@ -3187,14 +3187,14 @@ EnterLeaveEvent(
|
|||
int type,
|
||||
int mode,
|
||||
int detail,
|
||||
register WindowPtr pWin,
|
||||
WindowPtr pWin,
|
||||
Window child)
|
||||
{
|
||||
xEvent event;
|
||||
register DeviceIntPtr keybd = inputInfo.keyboard;
|
||||
DeviceIntPtr keybd = inputInfo.keyboard;
|
||||
WindowPtr focus;
|
||||
register DeviceIntPtr mouse = inputInfo.pointer;
|
||||
register GrabPtr grab = mouse->grab;
|
||||
DeviceIntPtr mouse = inputInfo.pointer;
|
||||
GrabPtr grab = mouse->grab;
|
||||
Mask mask;
|
||||
|
||||
if ((pWin == mouse->valuator->motionHintWindow) &&
|
||||
|
@ -3278,7 +3278,7 @@ EnterNotifies(WindowPtr ancestor, WindowPtr child, int mode, int detail)
|
|||
static void
|
||||
LeaveNotifies(WindowPtr child, WindowPtr ancestor, int mode, int detail)
|
||||
{
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
|
||||
if (ancestor == child)
|
||||
return;
|
||||
|
@ -3318,7 +3318,7 @@ DoEnterLeaveEvents(WindowPtr fromWin, WindowPtr toWin, int mode)
|
|||
}
|
||||
|
||||
static void
|
||||
FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr pWin)
|
||||
FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin)
|
||||
{
|
||||
xEvent event;
|
||||
|
||||
|
@ -3388,7 +3388,7 @@ FocusOutEvents(
|
|||
int mode, int detail,
|
||||
Bool doAncestor)
|
||||
{
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
|
||||
for (pWin = child; pWin != ancestor; pWin = pWin->parent)
|
||||
FocusEvent(dev, FocusOut, mode, detail, pWin);
|
||||
|
@ -3531,7 +3531,7 @@ SetInputFocus(
|
|||
Time ctime,
|
||||
Bool followOK)
|
||||
{
|
||||
register FocusClassPtr focus;
|
||||
FocusClassPtr focus;
|
||||
WindowPtr focusWin;
|
||||
int mode, rc;
|
||||
TimeStamp time;
|
||||
|
@ -3579,7 +3579,7 @@ SetInputFocus(
|
|||
else
|
||||
{
|
||||
int depth = 0;
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
|
||||
for (pWin = focusWin; pWin; pWin = pWin->parent) depth++;
|
||||
if (depth > focus->traceSize)
|
||||
|
@ -3745,7 +3745,7 @@ int
|
|||
ProcChangeActivePointerGrab(ClientPtr client)
|
||||
{
|
||||
DeviceIntPtr device = inputInfo.pointer;
|
||||
register GrabPtr grab = device->grab;
|
||||
GrabPtr grab = device->grab;
|
||||
CursorPtr newCursor, oldCursor;
|
||||
REQUEST(xChangeActivePointerGrabReq);
|
||||
TimeStamp time;
|
||||
|
@ -3807,12 +3807,12 @@ ProcUngrabPointer(ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
GrabDevice(register ClientPtr client, register DeviceIntPtr dev,
|
||||
GrabDevice(ClientPtr client, DeviceIntPtr dev,
|
||||
unsigned this_mode, unsigned other_mode, Window grabWindow,
|
||||
unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
register GrabPtr grab;
|
||||
GrabPtr grab;
|
||||
TimeStamp time;
|
||||
int rc;
|
||||
|
||||
|
@ -4433,7 +4433,7 @@ CheckCursorConfinement(WindowPtr pWin)
|
|||
Mask
|
||||
EventMaskForClient(WindowPtr pWin, ClientPtr client)
|
||||
{
|
||||
register OtherClientsPtr other;
|
||||
OtherClientsPtr other;
|
||||
|
||||
if (wClient (pWin) == client)
|
||||
return pWin->eventMask;
|
||||
|
|
|
@ -66,8 +66,6 @@ SOFTWARE.
|
|||
#define LAST_EVENT 128
|
||||
#define LAST_ERROR 255
|
||||
|
||||
ScreenProcEntry AuxillaryScreenProcs[MAXSCREENS];
|
||||
|
||||
static ExtensionEntry **extensions = (ExtensionEntry **)NULL;
|
||||
|
||||
int lastEvent = EXTENSION_EVENT_BASE;
|
||||
|
@ -81,11 +79,11 @@ extern unsigned totalExtensionSize;
|
|||
static void
|
||||
InitExtensionPrivates(ExtensionEntry *ext)
|
||||
{
|
||||
register char *ptr;
|
||||
char *ptr;
|
||||
DevUnion *ppriv;
|
||||
register unsigned *sizes;
|
||||
register unsigned size;
|
||||
register int i;
|
||||
unsigned *sizes;
|
||||
unsigned size;
|
||||
int i;
|
||||
|
||||
if (totalExtensionSize == sizeof(ExtensionEntry))
|
||||
ppriv = (DevUnion *)NULL;
|
||||
|
@ -115,7 +113,7 @@ AddExtension(char *name, int NumEvents, int NumErrors,
|
|||
unsigned short (*MinorOpcodeProc)(ClientPtr c3))
|
||||
{
|
||||
int i;
|
||||
register ExtensionEntry *ext, **newexts;
|
||||
ExtensionEntry *ext, **newexts;
|
||||
|
||||
if (!MainProc || !SwappedMainProc || !CloseDownProc || !MinorOpcodeProc)
|
||||
return((ExtensionEntry *) NULL);
|
||||
|
@ -282,7 +280,7 @@ MinorOpcodeOfRequest(ClientPtr client)
|
|||
void
|
||||
CloseDownExtensions()
|
||||
{
|
||||
register int i,j;
|
||||
int i,j;
|
||||
|
||||
for (i = NumExtensions - 1; i >= 0; i--)
|
||||
{
|
||||
|
@ -298,21 +296,8 @@ CloseDownExtensions()
|
|||
extensions = (ExtensionEntry **)NULL;
|
||||
lastEvent = EXTENSION_EVENT_BASE;
|
||||
lastError = FirstExtensionError;
|
||||
for (i=0; i<MAXSCREENS; i++)
|
||||
{
|
||||
register ScreenProcEntry *spentry = &AuxillaryScreenProcs[i];
|
||||
|
||||
while (spentry->num)
|
||||
{
|
||||
spentry->num--;
|
||||
xfree(spentry->procList[spentry->num].name);
|
||||
}
|
||||
xfree(spentry->procList);
|
||||
spentry->procList = (ProcEntryPtr)NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ProcQueryExtension(ClientPtr client)
|
||||
{
|
||||
|
@ -363,7 +348,7 @@ ProcListExtensions(ClientPtr client)
|
|||
|
||||
if ( NumExtensions )
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
for (i=0; i<NumExtensions; i++)
|
||||
{
|
||||
|
@ -406,72 +391,6 @@ ProcListExtensions(ClientPtr client)
|
|||
return(client->noClientException);
|
||||
}
|
||||
|
||||
|
||||
ExtensionLookupProc
|
||||
LookupProc(char *name, GCPtr pGC)
|
||||
{
|
||||
register int i;
|
||||
register ScreenProcEntry *spentry;
|
||||
spentry = &AuxillaryScreenProcs[pGC->pScreen->myNum];
|
||||
if (spentry->num)
|
||||
{
|
||||
for (i = 0; i < spentry->num; i++)
|
||||
if (strcmp(name, spentry->procList[i].name) == 0)
|
||||
return(spentry->procList[i].proc);
|
||||
}
|
||||
return (ExtensionLookupProc)NULL;
|
||||
}
|
||||
|
||||
Bool
|
||||
RegisterProc(char *name, GC *pGC, ExtensionLookupProc proc)
|
||||
{
|
||||
return RegisterScreenProc(name, pGC->pScreen, proc);
|
||||
}
|
||||
|
||||
Bool
|
||||
RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc)
|
||||
{
|
||||
register ScreenProcEntry *spentry;
|
||||
register ProcEntryPtr procEntry = (ProcEntryPtr)NULL;
|
||||
char *newname;
|
||||
int i;
|
||||
|
||||
spentry = &AuxillaryScreenProcs[pScreen->myNum];
|
||||
/* first replace duplicates */
|
||||
if (spentry->num)
|
||||
{
|
||||
for (i = 0; i < spentry->num; i++)
|
||||
if (strcmp(name, spentry->procList[i].name) == 0)
|
||||
{
|
||||
procEntry = &spentry->procList[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (procEntry)
|
||||
procEntry->proc = proc;
|
||||
else
|
||||
{
|
||||
newname = (char *)xalloc(strlen(name)+1);
|
||||
if (!newname)
|
||||
return FALSE;
|
||||
procEntry = (ProcEntryPtr)
|
||||
xrealloc(spentry->procList,
|
||||
sizeof(ProcEntryRec) * (spentry->num+1));
|
||||
if (!procEntry)
|
||||
{
|
||||
xfree(newname);
|
||||
return FALSE;
|
||||
}
|
||||
spentry->procList = procEntry;
|
||||
procEntry += spentry->num;
|
||||
procEntry->name = newname;
|
||||
strcpy(newname, name);
|
||||
procEntry->proc = proc;
|
||||
spentry->num++;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef XSERVER_DTRACE
|
||||
void LoadExtensionNames(char **RequestNames) {
|
||||
int i;
|
||||
|
|
81
dix/gc.c
81
dix/gc.c
|
@ -69,7 +69,7 @@ extern FontPtr defaultFont;
|
|||
|
||||
static Bool CreateDefaultTile(GCPtr pGC);
|
||||
|
||||
unsigned char DefaultDash[2] = {4, 4};
|
||||
static unsigned char DefaultDash[2] = {4, 4};
|
||||
|
||||
_X_EXPORT void
|
||||
ValidateGC(DrawablePtr pDraw, GC *pGC)
|
||||
|
@ -144,12 +144,12 @@ ValidateGC(DrawablePtr pDraw, GC *pGC)
|
|||
assert(pUnion); _var = (_type)pUnion->ptr; pUnion++; }
|
||||
|
||||
_X_EXPORT int
|
||||
dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion)
|
||||
dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion)
|
||||
{
|
||||
register BITS32 index2;
|
||||
register int error = 0;
|
||||
PixmapPtr pPixmap;
|
||||
BITS32 maskQ;
|
||||
BITS32 index2;
|
||||
int error = 0;
|
||||
PixmapPtr pPixmap;
|
||||
BITS32 maskQ;
|
||||
|
||||
assert( (pC32 && !pUnion) || (!pC32 && pUnion) );
|
||||
pGC->serialNumber |= GC_CHANGE_SERIAL_BIT;
|
||||
|
@ -522,7 +522,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC
|
|||
/* Publically defined entry to ChangeGC. Just calls dixChangeGC and tells
|
||||
* it that all of the entries are constants or IDs */
|
||||
_X_EXPORT int
|
||||
ChangeGC(register GC *pGC, register BITS32 mask, XID *pval)
|
||||
ChangeGC(GC *pGC, BITS32 mask, XID *pval)
|
||||
{
|
||||
return (dixChangeGC(NullClient, pGC, mask, pval, NULL));
|
||||
}
|
||||
|
@ -548,7 +548,7 @@ NOTE:
|
|||
32 bits long
|
||||
*/
|
||||
_X_EXPORT int
|
||||
DoChangeGC(register GC *pGC, register BITS32 mask, XID *pval, int fPointer)
|
||||
DoChangeGC(GC *pGC, BITS32 mask, XID *pval, int fPointer)
|
||||
{
|
||||
if (fPointer)
|
||||
/* XXX might be a problem on 64 bit big-endian servers */
|
||||
|
@ -572,11 +572,11 @@ static GCPtr
|
|||
AllocateGC(ScreenPtr pScreen)
|
||||
{
|
||||
GCPtr pGC;
|
||||
register char *ptr;
|
||||
register DevUnion *ppriv;
|
||||
register unsigned *sizes;
|
||||
register unsigned size;
|
||||
register int i;
|
||||
char *ptr;
|
||||
DevUnion *ppriv;
|
||||
unsigned *sizes;
|
||||
unsigned size;
|
||||
int i;
|
||||
|
||||
pGC = (GCPtr)xalloc(pScreen->totalGCSize);
|
||||
if (pGC)
|
||||
|
@ -602,7 +602,7 @@ AllocateGC(ScreenPtr pScreen)
|
|||
_X_EXPORT GCPtr
|
||||
CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus)
|
||||
{
|
||||
register GCPtr pGC;
|
||||
GCPtr pGC;
|
||||
|
||||
pGC = AllocateGC(pDrawable->pScreen);
|
||||
if (!pGC)
|
||||
|
@ -724,11 +724,11 @@ CreateDefaultTile (GCPtr pGC)
|
|||
}
|
||||
|
||||
_X_EXPORT int
|
||||
CopyGC(register GC *pgcSrc, register GC *pgcDst, register BITS32 mask)
|
||||
CopyGC(GC *pgcSrc, GC *pgcDst, BITS32 mask)
|
||||
{
|
||||
register BITS32 index2;
|
||||
BITS32 maskQ;
|
||||
int error = 0;
|
||||
BITS32 index2;
|
||||
BITS32 maskQ;
|
||||
int error = 0;
|
||||
|
||||
if (pgcSrc == pgcDst)
|
||||
return Success;
|
||||
|
@ -907,17 +907,6 @@ FreeGC(pointer value, XID gid)
|
|||
return(Success);
|
||||
}
|
||||
|
||||
void
|
||||
SetGCMask(GCPtr pGC, Mask selectMask, Mask newDataMask)
|
||||
{
|
||||
pGC->stateChanges = (~selectMask & pGC->stateChanges) |
|
||||
(selectMask & newDataMask);
|
||||
if (selectMask & newDataMask)
|
||||
pGC->serialNumber |= GC_CHANGE_SERIAL_BIT;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* CreateScratchGC(pScreen, depth)
|
||||
like CreateGC, but doesn't do the default tile or stipple,
|
||||
since we can't create them without already having a GC. any code
|
||||
|
@ -934,7 +923,7 @@ go with CreateGC() or ChangeGC().)
|
|||
_X_EXPORT GCPtr
|
||||
CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
||||
{
|
||||
register GCPtr pGC;
|
||||
GCPtr pGC;
|
||||
|
||||
pGC = AllocateGC(pScreen);
|
||||
if (!pGC)
|
||||
|
@ -986,8 +975,8 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
|||
void
|
||||
FreeGCperDepth(int screenNum)
|
||||
{
|
||||
register int i;
|
||||
register ScreenPtr pScreen;
|
||||
int i;
|
||||
ScreenPtr pScreen;
|
||||
GCPtr *ppGC;
|
||||
|
||||
pScreen = screenInfo.screens[screenNum];
|
||||
|
@ -1002,8 +991,8 @@ FreeGCperDepth(int screenNum)
|
|||
Bool
|
||||
CreateGCperDepth(int screenNum)
|
||||
{
|
||||
register int i;
|
||||
register ScreenPtr pScreen;
|
||||
int i;
|
||||
ScreenPtr pScreen;
|
||||
DepthPtr pDepth;
|
||||
GCPtr *ppGC;
|
||||
|
||||
|
@ -1035,7 +1024,7 @@ CreateGCperDepth(int screenNum)
|
|||
Bool
|
||||
CreateDefaultStipple(int screenNum)
|
||||
{
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
XID tmpval[3];
|
||||
xRectangle rect;
|
||||
CARD16 w, h;
|
||||
|
@ -1077,10 +1066,10 @@ FreeDefaultStipple(int screenNum)
|
|||
}
|
||||
|
||||
_X_EXPORT int
|
||||
SetDashes(register GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash)
|
||||
SetDashes(GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash)
|
||||
{
|
||||
register long i;
|
||||
register unsigned char *p, *indash;
|
||||
long i;
|
||||
unsigned char *p, *indash;
|
||||
BITS32 maskQ = 0;
|
||||
|
||||
i = ndash;
|
||||
|
@ -1135,8 +1124,8 @@ SetDashes(register GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pd
|
|||
_X_EXPORT int
|
||||
VerifyRectOrder(int nrects, xRectangle *prects, int ordering)
|
||||
{
|
||||
register xRectangle *prectP, *prectN;
|
||||
register int i;
|
||||
xRectangle *prectP, *prectN;
|
||||
int i;
|
||||
|
||||
switch(ordering)
|
||||
{
|
||||
|
@ -1220,10 +1209,10 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects,
|
|||
you use it often enough it will become real.)
|
||||
*/
|
||||
_X_EXPORT GCPtr
|
||||
GetScratchGC(register unsigned depth, register ScreenPtr pScreen)
|
||||
GetScratchGC(unsigned depth, ScreenPtr pScreen)
|
||||
{
|
||||
register int i;
|
||||
register GCPtr pGC;
|
||||
int i;
|
||||
GCPtr pGC;
|
||||
|
||||
for (i=0; i<=pScreen->numDepths; i++)
|
||||
if ( pScreen->GCperDepth[i]->depth == depth &&
|
||||
|
@ -1269,10 +1258,10 @@ mark it as available.
|
|||
if not, free it for real
|
||||
*/
|
||||
_X_EXPORT void
|
||||
FreeScratchGC(register GCPtr pGC)
|
||||
FreeScratchGC(GCPtr pGC)
|
||||
{
|
||||
register ScreenPtr pScreen = pGC->pScreen;
|
||||
register int i;
|
||||
ScreenPtr pScreen = pGC->pScreen;
|
||||
int i;
|
||||
|
||||
for (i=0; i<=pScreen->numDepths; i++)
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
#ifdef XKB
|
||||
#include <X11/extensions/XKBproto.h>
|
||||
#include <X11/extensions/XKBsrv.h>
|
||||
#include <xkbsrv.h>
|
||||
extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -74,10 +74,10 @@ cursor metrics.
|
|||
*/
|
||||
|
||||
int
|
||||
ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, unsigned char **ppbits)
|
||||
ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, unsigned char **ppbits)
|
||||
{
|
||||
register ScreenPtr pScreen;
|
||||
register GCPtr pGC;
|
||||
ScreenPtr pScreen;
|
||||
GCPtr pGC;
|
||||
xRectangle rect;
|
||||
PixmapPtr ppix;
|
||||
long nby;
|
||||
|
@ -140,7 +140,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
|
|||
|
||||
|
||||
Bool
|
||||
CursorMetricsFromGlyph(register FontPtr pfont, unsigned ch, register CursorMetricPtr cm)
|
||||
CursorMetricsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm)
|
||||
{
|
||||
CharInfoPtr pci;
|
||||
unsigned long nglyphs;
|
||||
|
|
|
@ -128,7 +128,7 @@ FreeGrab(GrabPtr pGrab)
|
|||
int
|
||||
DeletePassiveGrab(pointer value, XID id)
|
||||
{
|
||||
register GrabPtr g, prev;
|
||||
GrabPtr g, prev;
|
||||
GrabPtr pGrab = (GrabPtr)value;
|
||||
|
||||
/* it is OK if the grab isn't found */
|
||||
|
@ -153,8 +153,8 @@ DeletePassiveGrab(pointer value, XID id)
|
|||
static Mask *
|
||||
DeleteDetailFromMask(Mask *pDetailMask, unsigned short detail)
|
||||
{
|
||||
register Mask *mask;
|
||||
register int i;
|
||||
Mask *mask;
|
||||
int i;
|
||||
|
||||
mask = (Mask *)xalloc(sizeof(Mask) * MasksPerDetailMask);
|
||||
if (mask)
|
||||
|
@ -305,7 +305,7 @@ AddPassiveGrabToList(GrabPtr pGrab)
|
|||
Bool
|
||||
DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
|
||||
{
|
||||
register GrabPtr grab;
|
||||
GrabPtr grab;
|
||||
GrabPtr *deletes, *adds;
|
||||
Mask ***updates, **details;
|
||||
int i, ndels, nadds, nups;
|
||||
|
|
|
@ -361,9 +361,7 @@ main(int argc, char *argv[], char *envp[])
|
|||
ResetScreenPrivates();
|
||||
ResetWindowPrivates();
|
||||
ResetGCPrivates();
|
||||
#ifdef PIXPRIV
|
||||
ResetPixmapPrivates();
|
||||
#endif
|
||||
ResetColormapPrivates();
|
||||
ResetFontPrivateIndex();
|
||||
ResetDevicePrivateIndex();
|
||||
|
@ -731,11 +729,9 @@ AddScreen(
|
|||
pScreen->GCPrivateSizes = (unsigned *)NULL;
|
||||
pScreen->totalGCSize =
|
||||
((sizeof(GC) + sizeof(long) - 1) / sizeof(long)) * sizeof(long);
|
||||
#ifdef PIXPRIV
|
||||
pScreen->PixmapPrivateLen = 0;
|
||||
pScreen->PixmapPrivateSizes = (unsigned *)NULL;
|
||||
pScreen->totalPixmapSize = BitmapBytePad(sizeof(PixmapRec)*8);
|
||||
#endif
|
||||
pScreen->ClipNotify = 0; /* for R4 ddx compatibility */
|
||||
pScreen->CreateScreenResources = 0;
|
||||
|
||||
|
@ -799,9 +795,7 @@ FreeScreen(ScreenPtr pScreen)
|
|||
{
|
||||
xfree(pScreen->WindowPrivateSizes);
|
||||
xfree(pScreen->GCPrivateSizes);
|
||||
#ifdef PIXPRIV
|
||||
xfree(pScreen->PixmapPrivateSizes);
|
||||
#endif
|
||||
xfree(pScreen->devPrivates);
|
||||
xfree(pScreen);
|
||||
}
|
||||
|
|
|
@ -109,7 +109,6 @@ _X_EXPORT PixmapPtr
|
|||
AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
|
||||
{
|
||||
PixmapPtr pPixmap;
|
||||
#ifdef PIXPRIV
|
||||
char *ptr;
|
||||
DevUnion *ppriv;
|
||||
unsigned *sizes;
|
||||
|
@ -136,9 +135,6 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
|
|||
else
|
||||
ppriv->ptr = (pointer)NULL;
|
||||
}
|
||||
#else
|
||||
pPixmap = (PixmapPtr)xalloc(sizeof(PixmapRec) + pixDataSize);
|
||||
#endif
|
||||
|
||||
#ifdef _XSERVER64
|
||||
if (pPixmap) {
|
||||
|
|
|
@ -225,7 +225,7 @@ AllocateWindowPrivateIndex()
|
|||
}
|
||||
|
||||
_X_EXPORT Bool
|
||||
AllocateWindowPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
||||
AllocateWindowPrivate(ScreenPtr pScreen, int index2, unsigned amount)
|
||||
{
|
||||
unsigned oldamount;
|
||||
|
||||
|
@ -275,7 +275,7 @@ AllocateGCPrivateIndex()
|
|||
}
|
||||
|
||||
_X_EXPORT Bool
|
||||
AllocateGCPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
||||
AllocateGCPrivate(ScreenPtr pScreen, int index2, unsigned amount)
|
||||
{
|
||||
unsigned oldamount;
|
||||
|
||||
|
@ -309,7 +309,6 @@ AllocateGCPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
|||
/*
|
||||
* pixmap private machinery
|
||||
*/
|
||||
#ifdef PIXPRIV
|
||||
static int pixmapPrivateCount;
|
||||
|
||||
void
|
||||
|
@ -325,7 +324,7 @@ AllocatePixmapPrivateIndex()
|
|||
}
|
||||
|
||||
_X_EXPORT Bool
|
||||
AllocatePixmapPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
||||
AllocatePixmapPrivate(ScreenPtr pScreen, int index2, unsigned amount)
|
||||
{
|
||||
unsigned oldamount;
|
||||
|
||||
|
@ -355,7 +354,6 @@ AllocatePixmapPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
|||
pScreen->totalPixmapSize = BitmapBytePad(pScreen->totalPixmapSize * 8);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -76,7 +76,7 @@ static void
|
|||
PrintPropertys(WindowPtr pWin)
|
||||
{
|
||||
PropertyPtr pProp;
|
||||
register int j;
|
||||
int j;
|
||||
|
||||
pProp = pWin->userProps;
|
||||
while (pProp)
|
||||
|
@ -97,7 +97,7 @@ ProcRotateProperties(ClientPtr client)
|
|||
int i, j, delta, rc;
|
||||
REQUEST(xRotatePropertiesReq);
|
||||
WindowPtr pWin;
|
||||
register Atom * atoms;
|
||||
Atom * atoms;
|
||||
PropertyPtr * props; /* array of pointer */
|
||||
PropertyPtr pProp;
|
||||
xEvent event;
|
||||
|
@ -622,7 +622,7 @@ ProcListProperties(ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcDeleteProperty(register ClientPtr client)
|
||||
ProcDeleteProperty(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xDeletePropertyReq);
|
||||
|
|
|
@ -246,7 +246,7 @@ CreateNewResourceClass()
|
|||
return next;
|
||||
}
|
||||
|
||||
ClientResourceRec clientTable[MAXCLIENTS];
|
||||
static ClientResourceRec clientTable[MAXCLIENTS];
|
||||
|
||||
/*****************
|
||||
* InitClientResources
|
||||
|
@ -257,7 +257,7 @@ ClientResourceRec clientTable[MAXCLIENTS];
|
|||
Bool
|
||||
InitClientResources(ClientPtr client)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
if (client == serverClient)
|
||||
{
|
||||
|
@ -314,7 +314,7 @@ InitClientResources(ClientPtr client)
|
|||
|
||||
|
||||
static int
|
||||
Hash(int client, register XID id)
|
||||
Hash(int client, XID id)
|
||||
{
|
||||
id &= RESOURCE_ID_MASK;
|
||||
switch (clientTable[client].hashsize)
|
||||
|
@ -337,12 +337,12 @@ Hash(int client, register XID id)
|
|||
|
||||
static XID
|
||||
AvailableID(
|
||||
register int client,
|
||||
register XID id,
|
||||
register XID maxid,
|
||||
register XID goodid)
|
||||
int client,
|
||||
XID id,
|
||||
XID maxid,
|
||||
XID goodid)
|
||||
{
|
||||
register ResourcePtr res;
|
||||
ResourcePtr res;
|
||||
|
||||
if ((goodid >= id) && (goodid <= maxid))
|
||||
return goodid;
|
||||
|
@ -360,10 +360,10 @@ AvailableID(
|
|||
_X_EXPORT void
|
||||
GetXIDRange(int client, Bool server, XID *minp, XID *maxp)
|
||||
{
|
||||
register XID id, maxid;
|
||||
register ResourcePtr *resp;
|
||||
register ResourcePtr res;
|
||||
register int i;
|
||||
XID id, maxid;
|
||||
ResourcePtr *resp;
|
||||
ResourcePtr res;
|
||||
int i;
|
||||
XID goodid;
|
||||
|
||||
id = (Mask)client << CLIENTOFFSET;
|
||||
|
@ -436,7 +436,7 @@ GetXIDList(ClientPtr pClient, unsigned count, XID *pids)
|
|||
*/
|
||||
|
||||
_X_EXPORT XID
|
||||
FakeClientID(register int client)
|
||||
FakeClientID(int client)
|
||||
{
|
||||
XID id, maxid;
|
||||
|
||||
|
@ -460,8 +460,8 @@ _X_EXPORT Bool
|
|||
AddResource(XID id, RESTYPE type, pointer value)
|
||||
{
|
||||
int client;
|
||||
register ClientResourceRec *rrec;
|
||||
register ResourcePtr res, *head;
|
||||
ClientResourceRec *rrec;
|
||||
ResourcePtr res, *head;
|
||||
|
||||
#ifdef XSERVER_DTRACE
|
||||
XSERVER_RESOURCE_ALLOC(id, type, value, TypeNameString(type));
|
||||
|
@ -498,10 +498,10 @@ AddResource(XID id, RESTYPE type, pointer value)
|
|||
static void
|
||||
RebuildTable(int client)
|
||||
{
|
||||
register int j;
|
||||
register ResourcePtr res, next;
|
||||
int j;
|
||||
ResourcePtr res, next;
|
||||
ResourcePtr **tails, *resources;
|
||||
register ResourcePtr **tptr, *rptr;
|
||||
ResourcePtr **tptr, *rptr;
|
||||
|
||||
/*
|
||||
* For now, preserve insertion order, since some ddx layers depend
|
||||
|
@ -548,9 +548,9 @@ _X_EXPORT void
|
|||
FreeResource(XID id, RESTYPE skipDeleteFuncType)
|
||||
{
|
||||
int cid;
|
||||
register ResourcePtr res;
|
||||
register ResourcePtr *prev, *head;
|
||||
register int *eltptr;
|
||||
ResourcePtr res;
|
||||
ResourcePtr *prev, *head;
|
||||
int *eltptr;
|
||||
int elements;
|
||||
Bool gotOne = FALSE;
|
||||
|
||||
|
@ -600,8 +600,8 @@ _X_EXPORT void
|
|||
FreeResourceByType(XID id, RESTYPE type, Bool skipFree)
|
||||
{
|
||||
int cid;
|
||||
register ResourcePtr res;
|
||||
register ResourcePtr *prev, *head;
|
||||
ResourcePtr res;
|
||||
ResourcePtr *prev, *head;
|
||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets)
|
||||
{
|
||||
head = &clientTable[cid].resources[Hash(cid, id)];
|
||||
|
@ -644,7 +644,7 @@ _X_EXPORT Bool
|
|||
ChangeResourceValue (XID id, RESTYPE rtype, pointer value)
|
||||
{
|
||||
int cid;
|
||||
register ResourcePtr res;
|
||||
ResourcePtr res;
|
||||
|
||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets)
|
||||
{
|
||||
|
@ -675,10 +675,10 @@ FindClientResourcesByType(
|
|||
FindResType func,
|
||||
pointer cdata
|
||||
){
|
||||
register ResourcePtr *resources;
|
||||
register ResourcePtr this, next;
|
||||
ResourcePtr *resources;
|
||||
ResourcePtr this, next;
|
||||
int i, elements;
|
||||
register int *eltptr;
|
||||
int *eltptr;
|
||||
|
||||
if (!client)
|
||||
client = serverClient;
|
||||
|
@ -706,10 +706,10 @@ FindAllClientResources(
|
|||
FindAllRes func,
|
||||
pointer cdata
|
||||
){
|
||||
register ResourcePtr *resources;
|
||||
register ResourcePtr this, next;
|
||||
ResourcePtr *resources;
|
||||
ResourcePtr this, next;
|
||||
int i, elements;
|
||||
register int *eltptr;
|
||||
int *eltptr;
|
||||
|
||||
if (!client)
|
||||
client = serverClient;
|
||||
|
@ -796,8 +796,8 @@ FreeClientNeverRetainResources(ClientPtr client)
|
|||
void
|
||||
FreeClientResources(ClientPtr client)
|
||||
{
|
||||
register ResourcePtr *resources;
|
||||
register ResourcePtr this;
|
||||
ResourcePtr *resources;
|
||||
ResourcePtr this;
|
||||
int j;
|
||||
|
||||
/* This routine shouldn't be called with a null client, but just in
|
||||
|
@ -856,7 +856,7 @@ FreeAllResources()
|
|||
}
|
||||
|
||||
_X_EXPORT Bool
|
||||
LegalNewID(XID id, register ClientPtr client)
|
||||
LegalNewID(XID id, ClientPtr client)
|
||||
{
|
||||
|
||||
#ifdef PANORAMIX
|
||||
|
@ -887,7 +887,7 @@ _X_EXPORT pointer
|
|||
SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode)
|
||||
{
|
||||
int cid;
|
||||
register ResourcePtr res;
|
||||
ResourcePtr res;
|
||||
pointer retval = NULL;
|
||||
|
||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
||||
|
@ -914,7 +914,7 @@ _X_EXPORT pointer
|
|||
SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode)
|
||||
{
|
||||
int cid;
|
||||
register ResourcePtr res = NULL;
|
||||
ResourcePtr res = NULL;
|
||||
pointer retval = NULL;
|
||||
|
||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
||||
|
|
199
dix/swaprep.c
199
dix/swaprep.c
|
@ -73,10 +73,10 @@ static void SwapFont(xQueryFontReply *pr, Bool hasGlyphs);
|
|||
* \param size size in bytes
|
||||
*/
|
||||
_X_EXPORT void
|
||||
Swap32Write(ClientPtr pClient, int size, register CARD32 *pbuf)
|
||||
Swap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
|
||||
{
|
||||
register int i;
|
||||
register char n;
|
||||
int i;
|
||||
char n;
|
||||
|
||||
size >>= 2;
|
||||
for(i = 0; i < size; i++)
|
||||
|
@ -97,7 +97,7 @@ CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
|
|||
{
|
||||
int bufsize = size;
|
||||
CARD32 *pbufT;
|
||||
register CARD32 *from, *to, *fromLast, *toLast;
|
||||
CARD32 *from, *to, *fromLast, *toLast;
|
||||
CARD32 tmpbuf[1];
|
||||
|
||||
/* Allocate as big a buffer as we can... */
|
||||
|
@ -145,7 +145,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
|
|||
{
|
||||
int bufsize = size;
|
||||
short *pbufT;
|
||||
register short *from, *to, *fromLast, *toLast;
|
||||
short *from, *to, *fromLast, *toLast;
|
||||
short tmpbuf[2];
|
||||
|
||||
/* Allocate as big a buffer as we can... */
|
||||
|
@ -189,7 +189,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
|
|||
void
|
||||
SGenericReply(ClientPtr pClient, int size, xGenericReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||
|
@ -200,7 +200,7 @@ void
|
|||
SGetWindowAttributesReply(ClientPtr pClient, int size,
|
||||
xGetWindowAttributesReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -218,7 +218,7 @@ SGetWindowAttributesReply(ClientPtr pClient, int size,
|
|||
void
|
||||
SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->root, n);
|
||||
|
@ -233,7 +233,7 @@ SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply *pRep)
|
|||
void
|
||||
SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -246,7 +246,7 @@ SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply *pRep)
|
|||
void
|
||||
SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->atom, n);
|
||||
|
@ -256,7 +256,7 @@ SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply *pRep)
|
|||
void
|
||||
SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -268,7 +268,7 @@ SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep)
|
|||
void
|
||||
SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -281,7 +281,7 @@ SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply *pRep)
|
|||
void
|
||||
SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -293,7 +293,7 @@ void
|
|||
SGetSelectionOwnerReply(ClientPtr pClient, int size,
|
||||
xGetSelectionOwnerReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->owner, n);
|
||||
|
@ -304,7 +304,7 @@ SGetSelectionOwnerReply(ClientPtr pClient, int size,
|
|||
void
|
||||
SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->root, n);
|
||||
|
@ -317,10 +317,10 @@ SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
|
|||
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SwapTimecoord(xTimecoord* pCoord)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swapl(&pCoord->time, n);
|
||||
swaps(&pCoord->x, n);
|
||||
|
@ -346,7 +346,7 @@ SwapTimeCoordWrite(ClientPtr pClient, int size, xTimecoord *pRep)
|
|||
void
|
||||
SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -357,7 +357,7 @@ SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply *pRep)
|
|||
void
|
||||
STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->child, n);
|
||||
|
@ -369,7 +369,7 @@ STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply *pRep)
|
|||
void
|
||||
SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->focus, n);
|
||||
|
@ -380,7 +380,7 @@ SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep)
|
|||
void
|
||||
SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -390,7 +390,7 @@ SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep)
|
|||
static void
|
||||
SwapCharInfo(xCharInfo *pInfo)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pInfo->leftSideBearing, n);
|
||||
swaps(&pInfo->rightSideBearing, n);
|
||||
|
@ -403,7 +403,7 @@ SwapCharInfo(xCharInfo *pInfo)
|
|||
static void
|
||||
SwapFontInfo(xQueryFontReply *pr)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pr->minCharOrByte2, n);
|
||||
swaps(&pr->maxCharOrByte2, n);
|
||||
|
@ -423,7 +423,7 @@ SwapFont(xQueryFontReply *pr, Bool hasGlyphs)
|
|||
xCharInfo * pxci;
|
||||
unsigned nchars, nprops;
|
||||
char *pby;
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pr->sequenceNumber, n);
|
||||
swapl(&pr->length, n);
|
||||
|
@ -458,7 +458,7 @@ SQueryFontReply(ClientPtr pClient, int size, xQueryFontReply *pRep)
|
|||
void
|
||||
SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swaps(&pRep->fontAscent, n);
|
||||
|
@ -474,7 +474,7 @@ SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply *pRep
|
|||
void
|
||||
SListFontsReply(ClientPtr pClient, int size, xListFontsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -493,7 +493,7 @@ SListFontsWithInfoReply(ClientPtr pClient, int size,
|
|||
void
|
||||
SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -504,7 +504,7 @@ SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply *pRep)
|
|||
void
|
||||
SGetImageReply(ClientPtr pClient, int size, xGetImageReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -517,7 +517,7 @@ void
|
|||
SListInstalledColormapsReply(ClientPtr pClient, int size,
|
||||
xListInstalledColormapsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -531,7 +531,7 @@ SAllocColorReply(pClient, size, pRep)
|
|||
int size;
|
||||
xAllocColorReply *pRep;
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swaps(&pRep->red, n);
|
||||
|
@ -544,7 +544,7 @@ SAllocColorReply(pClient, size, pRep)
|
|||
void
|
||||
SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->pixel, n);
|
||||
|
@ -560,7 +560,7 @@ SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply *pRep)
|
|||
void
|
||||
SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -573,7 +573,7 @@ SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep)
|
|||
void
|
||||
SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -584,10 +584,10 @@ SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep
|
|||
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SwapRGB(xrgb *prgb)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&prgb->red, n);
|
||||
swaps(&prgb->green, n);
|
||||
|
@ -613,7 +613,7 @@ SQColorsExtend(ClientPtr pClient, int size, xrgb *prgb)
|
|||
void
|
||||
SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply* pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -624,7 +624,7 @@ SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply* pRep)
|
|||
void
|
||||
SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swaps(&pRep->exactRed, n);
|
||||
|
@ -639,7 +639,7 @@ SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply *pRep)
|
|||
void
|
||||
SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swaps(&pRep->width, n);
|
||||
|
@ -650,7 +650,7 @@ SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply *pRep)
|
|||
void
|
||||
SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -661,7 +661,7 @@ void
|
|||
SGetKeyboardMappingReply(ClientPtr pClient, int size,
|
||||
xGetKeyboardMappingReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -672,7 +672,7 @@ void
|
|||
SGetPointerMappingReply(ClientPtr pClient, int size,
|
||||
xGetPointerMappingReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -683,7 +683,7 @@ void
|
|||
SGetModifierMappingReply(ClientPtr pClient, int size,
|
||||
xGetModifierMappingReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -693,7 +693,7 @@ SGetModifierMappingReply(ClientPtr pClient, int size,
|
|||
void
|
||||
SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -706,7 +706,7 @@ SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply *
|
|||
void
|
||||
SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swaps(&pRep->accelNumerator, n);
|
||||
|
@ -718,7 +718,7 @@ SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply *pR
|
|||
void
|
||||
SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swaps(&pRep->timeout, n);
|
||||
|
@ -734,7 +734,7 @@ SLHostsExtend(ClientPtr pClient, int size, char *buf)
|
|||
while (bufT < endbuf) {
|
||||
xHostEntry *host = (xHostEntry *) bufT;
|
||||
int len = host->length;
|
||||
register char n;
|
||||
char n;
|
||||
swaps (&host->length, n);
|
||||
bufT += sizeof (xHostEntry) + (((len + 3) >> 2) << 2);
|
||||
}
|
||||
|
@ -744,7 +744,7 @@ SLHostsExtend(ClientPtr pClient, int size, char *buf)
|
|||
void
|
||||
SListHostsReply(ClientPtr pClient, int size, xListHostsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -1159,6 +1159,58 @@ SKeymapNotifyEvent(xEvent *from, xEvent *to)
|
|||
*to = *from;
|
||||
}
|
||||
|
||||
static void
|
||||
SwapConnSetup(xConnSetup *pConnSetup, xConnSetup *pConnSetupT)
|
||||
{
|
||||
cpswapl(pConnSetup->release, pConnSetupT->release);
|
||||
cpswapl(pConnSetup->ridBase, pConnSetupT->ridBase);
|
||||
cpswapl(pConnSetup->ridMask, pConnSetupT->ridMask);
|
||||
cpswapl(pConnSetup->motionBufferSize, pConnSetupT->motionBufferSize);
|
||||
cpswaps(pConnSetup->nbytesVendor, pConnSetupT->nbytesVendor);
|
||||
cpswaps(pConnSetup->maxRequestSize, pConnSetupT->maxRequestSize);
|
||||
pConnSetupT->minKeyCode = pConnSetup->minKeyCode;
|
||||
pConnSetupT->maxKeyCode = pConnSetup->maxKeyCode;
|
||||
pConnSetupT->numRoots = pConnSetup->numRoots;
|
||||
pConnSetupT->numFormats = pConnSetup->numFormats;
|
||||
pConnSetupT->imageByteOrder = pConnSetup->imageByteOrder;
|
||||
pConnSetupT->bitmapBitOrder = pConnSetup->bitmapBitOrder;
|
||||
pConnSetupT->bitmapScanlineUnit = pConnSetup->bitmapScanlineUnit;
|
||||
pConnSetupT->bitmapScanlinePad = pConnSetup->bitmapScanlinePad;
|
||||
}
|
||||
|
||||
static void
|
||||
SwapWinRoot(xWindowRoot *pRoot, xWindowRoot *pRootT)
|
||||
{
|
||||
cpswapl(pRoot->windowId, pRootT->windowId);
|
||||
cpswapl(pRoot->defaultColormap, pRootT->defaultColormap);
|
||||
cpswapl(pRoot->whitePixel, pRootT->whitePixel);
|
||||
cpswapl(pRoot->blackPixel, pRootT->blackPixel);
|
||||
cpswapl(pRoot->currentInputMask, pRootT->currentInputMask);
|
||||
cpswaps(pRoot->pixWidth, pRootT->pixWidth);
|
||||
cpswaps(pRoot->pixHeight, pRootT->pixHeight);
|
||||
cpswaps(pRoot->mmWidth, pRootT->mmWidth);
|
||||
cpswaps(pRoot->mmHeight, pRootT->mmHeight);
|
||||
cpswaps(pRoot->minInstalledMaps, pRootT->minInstalledMaps);
|
||||
cpswaps(pRoot->maxInstalledMaps, pRootT->maxInstalledMaps);
|
||||
cpswapl(pRoot->rootVisualID, pRootT->rootVisualID);
|
||||
pRootT->backingStore = pRoot->backingStore;
|
||||
pRootT->saveUnders = pRoot->saveUnders;
|
||||
pRootT->rootDepth = pRoot->rootDepth;
|
||||
pRootT->nDepths = pRoot->nDepths;
|
||||
}
|
||||
|
||||
static void
|
||||
SwapVisual(xVisualType *pVis, xVisualType *pVisT)
|
||||
{
|
||||
cpswapl(pVis->visualID, pVisT->visualID);
|
||||
pVisT->class = pVis->class;
|
||||
pVisT->bitsPerRGB = pVis->bitsPerRGB;
|
||||
cpswaps(pVis->colormapEntries, pVisT->colormapEntries);
|
||||
cpswapl(pVis->redMask, pVisT->redMask);
|
||||
cpswapl(pVis->greenMask, pVisT->greenMask);
|
||||
cpswapl(pVis->blueMask, pVisT->blueMask);
|
||||
}
|
||||
|
||||
_X_EXPORT void
|
||||
SwapConnSetupInfo(
|
||||
char *pInfo,
|
||||
|
@ -1210,7 +1262,6 @@ SwapConnSetupInfo(
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
|
||||
{
|
||||
|
@ -1227,58 +1278,6 @@ WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
|
|||
DEALLOCATE_LOCAL(pInfoTBase);
|
||||
}
|
||||
|
||||
void
|
||||
SwapConnSetup(xConnSetup *pConnSetup, xConnSetup *pConnSetupT)
|
||||
{
|
||||
cpswapl(pConnSetup->release, pConnSetupT->release);
|
||||
cpswapl(pConnSetup->ridBase, pConnSetupT->ridBase);
|
||||
cpswapl(pConnSetup->ridMask, pConnSetupT->ridMask);
|
||||
cpswapl(pConnSetup->motionBufferSize, pConnSetupT->motionBufferSize);
|
||||
cpswaps(pConnSetup->nbytesVendor, pConnSetupT->nbytesVendor);
|
||||
cpswaps(pConnSetup->maxRequestSize, pConnSetupT->maxRequestSize);
|
||||
pConnSetupT->minKeyCode = pConnSetup->minKeyCode;
|
||||
pConnSetupT->maxKeyCode = pConnSetup->maxKeyCode;
|
||||
pConnSetupT->numRoots = pConnSetup->numRoots;
|
||||
pConnSetupT->numFormats = pConnSetup->numFormats;
|
||||
pConnSetupT->imageByteOrder = pConnSetup->imageByteOrder;
|
||||
pConnSetupT->bitmapBitOrder = pConnSetup->bitmapBitOrder;
|
||||
pConnSetupT->bitmapScanlineUnit = pConnSetup->bitmapScanlineUnit;
|
||||
pConnSetupT->bitmapScanlinePad = pConnSetup->bitmapScanlinePad;
|
||||
}
|
||||
|
||||
void
|
||||
SwapWinRoot(xWindowRoot *pRoot, xWindowRoot *pRootT)
|
||||
{
|
||||
cpswapl(pRoot->windowId, pRootT->windowId);
|
||||
cpswapl(pRoot->defaultColormap, pRootT->defaultColormap);
|
||||
cpswapl(pRoot->whitePixel, pRootT->whitePixel);
|
||||
cpswapl(pRoot->blackPixel, pRootT->blackPixel);
|
||||
cpswapl(pRoot->currentInputMask, pRootT->currentInputMask);
|
||||
cpswaps(pRoot->pixWidth, pRootT->pixWidth);
|
||||
cpswaps(pRoot->pixHeight, pRootT->pixHeight);
|
||||
cpswaps(pRoot->mmWidth, pRootT->mmWidth);
|
||||
cpswaps(pRoot->mmHeight, pRootT->mmHeight);
|
||||
cpswaps(pRoot->minInstalledMaps, pRootT->minInstalledMaps);
|
||||
cpswaps(pRoot->maxInstalledMaps, pRootT->maxInstalledMaps);
|
||||
cpswapl(pRoot->rootVisualID, pRootT->rootVisualID);
|
||||
pRootT->backingStore = pRoot->backingStore;
|
||||
pRootT->saveUnders = pRoot->saveUnders;
|
||||
pRootT->rootDepth = pRoot->rootDepth;
|
||||
pRootT->nDepths = pRoot->nDepths;
|
||||
}
|
||||
|
||||
void
|
||||
SwapVisual(xVisualType *pVis, xVisualType *pVisT)
|
||||
{
|
||||
cpswapl(pVis->visualID, pVisT->visualID);
|
||||
pVisT->class = pVis->class;
|
||||
pVisT->bitsPerRGB = pVis->bitsPerRGB;
|
||||
cpswaps(pVis->colormapEntries, pVisT->colormapEntries);
|
||||
cpswapl(pVis->redMask, pVisT->redMask);
|
||||
cpswapl(pVis->greenMask, pVisT->greenMask);
|
||||
cpswapl(pVis->blueMask, pVisT->blueMask);
|
||||
}
|
||||
|
||||
_X_EXPORT void
|
||||
SwapConnSetupPrefix(xConnSetupPrefix *pcspFrom, xConnSetupPrefix *pcspTo)
|
||||
{
|
||||
|
|
276
dix/swapreq.c
276
dix/swapreq.c
|
@ -63,9 +63,9 @@ SOFTWARE.
|
|||
|
||||
/* Byte swap a list of longs */
|
||||
_X_EXPORT void
|
||||
SwapLongs (register CARD32 *list, register unsigned long count)
|
||||
SwapLongs (CARD32 *list, unsigned long count)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
while (count >= 8) {
|
||||
swapl(list+0, n);
|
||||
|
@ -89,9 +89,9 @@ SwapLongs (register CARD32 *list, register unsigned long count)
|
|||
|
||||
/* Byte swap a list of shorts */
|
||||
_X_EXPORT void
|
||||
SwapShorts (register short *list, register unsigned long count)
|
||||
SwapShorts (short *list, unsigned long count)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
while (count >= 16) {
|
||||
swaps(list+0, n);
|
||||
|
@ -124,9 +124,9 @@ SwapShorts (register short *list, register unsigned long count)
|
|||
/* The following is used for all requests that have
|
||||
no fields to be swapped (except "length") */
|
||||
int
|
||||
SProcSimpleReq(register ClientPtr client)
|
||||
SProcSimpleReq(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -137,9 +137,9 @@ SProcSimpleReq(register ClientPtr client)
|
|||
only a single 32-bit field to be swapped, coming
|
||||
right after the "length" field */
|
||||
int
|
||||
SProcResourceReq(register ClientPtr client)
|
||||
SProcResourceReq(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xResourceReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -149,9 +149,9 @@ SProcResourceReq(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCreateWindow(register ClientPtr client)
|
||||
SProcCreateWindow(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xCreateWindowReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -171,9 +171,9 @@ SProcCreateWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangeWindowAttributes(register ClientPtr client)
|
||||
SProcChangeWindowAttributes(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xChangeWindowAttributesReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -185,9 +185,9 @@ SProcChangeWindowAttributes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcReparentWindow(register ClientPtr client)
|
||||
SProcReparentWindow(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xReparentWindowReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xReparentWindowReq);
|
||||
|
@ -199,9 +199,9 @@ SProcReparentWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcConfigureWindow(register ClientPtr client)
|
||||
SProcConfigureWindow(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xConfigureWindowReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
|
||||
|
@ -214,9 +214,9 @@ SProcConfigureWindow(register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
SProcInternAtom(register ClientPtr client)
|
||||
SProcInternAtom(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xInternAtomReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xInternAtomReq);
|
||||
|
@ -225,9 +225,9 @@ SProcInternAtom(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangeProperty(register ClientPtr client)
|
||||
SProcChangeProperty(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xChangePropertyReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xChangePropertyReq);
|
||||
|
@ -249,9 +249,9 @@ SProcChangeProperty(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcDeleteProperty(register ClientPtr client)
|
||||
SProcDeleteProperty(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xDeletePropertyReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xDeletePropertyReq);
|
||||
|
@ -262,9 +262,9 @@ SProcDeleteProperty(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGetProperty(register ClientPtr client)
|
||||
SProcGetProperty(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGetPropertyReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGetPropertyReq);
|
||||
|
@ -277,9 +277,9 @@ SProcGetProperty(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcSetSelectionOwner(register ClientPtr client)
|
||||
SProcSetSelectionOwner(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xSetSelectionOwnerReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xSetSelectionOwnerReq);
|
||||
|
@ -290,9 +290,9 @@ SProcSetSelectionOwner(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcConvertSelection(register ClientPtr client)
|
||||
SProcConvertSelection(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xConvertSelectionReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xConvertSelectionReq);
|
||||
|
@ -305,9 +305,9 @@ SProcConvertSelection(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcSendEvent(register ClientPtr client)
|
||||
SProcSendEvent(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
xEvent eventT;
|
||||
EventSwapPtr proc;
|
||||
REQUEST(xSendEventReq);
|
||||
|
@ -327,9 +327,9 @@ SProcSendEvent(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGrabPointer(register ClientPtr client)
|
||||
SProcGrabPointer(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGrabPointerReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGrabPointerReq);
|
||||
|
@ -342,9 +342,9 @@ SProcGrabPointer(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGrabButton(register ClientPtr client)
|
||||
SProcGrabButton(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGrabButtonReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGrabButtonReq);
|
||||
|
@ -357,9 +357,9 @@ SProcGrabButton(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcUngrabButton(register ClientPtr client)
|
||||
SProcUngrabButton(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xUngrabButtonReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xUngrabButtonReq);
|
||||
|
@ -369,9 +369,9 @@ SProcUngrabButton(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangeActivePointerGrab(register ClientPtr client)
|
||||
SProcChangeActivePointerGrab(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xChangeActivePointerGrabReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq);
|
||||
|
@ -382,9 +382,9 @@ SProcChangeActivePointerGrab(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGrabKeyboard(register ClientPtr client)
|
||||
SProcGrabKeyboard(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGrabKeyboardReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGrabKeyboardReq);
|
||||
|
@ -394,9 +394,9 @@ SProcGrabKeyboard(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGrabKey(register ClientPtr client)
|
||||
SProcGrabKey(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGrabKeyReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGrabKeyReq);
|
||||
|
@ -406,9 +406,9 @@ SProcGrabKey(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcUngrabKey(register ClientPtr client)
|
||||
SProcUngrabKey(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xUngrabKeyReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xUngrabKeyReq);
|
||||
|
@ -418,9 +418,9 @@ SProcUngrabKey(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGetMotionEvents(register ClientPtr client)
|
||||
SProcGetMotionEvents(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGetMotionEventsReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGetMotionEventsReq);
|
||||
|
@ -431,9 +431,9 @@ SProcGetMotionEvents(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcTranslateCoords(register ClientPtr client)
|
||||
SProcTranslateCoords(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xTranslateCoordsReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xTranslateCoordsReq);
|
||||
|
@ -445,9 +445,9 @@ SProcTranslateCoords(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcWarpPointer(register ClientPtr client)
|
||||
SProcWarpPointer(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xWarpPointerReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xWarpPointerReq);
|
||||
|
@ -463,9 +463,9 @@ SProcWarpPointer(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcSetInputFocus(register ClientPtr client)
|
||||
SProcSetInputFocus(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xSetInputFocusReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xSetInputFocusReq);
|
||||
|
@ -475,9 +475,9 @@ SProcSetInputFocus(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcOpenFont(register ClientPtr client)
|
||||
SProcOpenFont(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xOpenFontReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xOpenFontReq);
|
||||
|
@ -487,9 +487,9 @@ SProcOpenFont(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcListFonts(register ClientPtr client)
|
||||
SProcListFonts(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xListFontsReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xListFontsReq);
|
||||
|
@ -499,9 +499,9 @@ SProcListFonts(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcListFontsWithInfo(register ClientPtr client)
|
||||
SProcListFontsWithInfo(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xListFontsWithInfoReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xListFontsWithInfoReq);
|
||||
|
@ -511,9 +511,9 @@ SProcListFontsWithInfo(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcSetFontPath(register ClientPtr client)
|
||||
SProcSetFontPath(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xSetFontPathReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xSetFontPathReq);
|
||||
|
@ -522,9 +522,9 @@ SProcSetFontPath(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCreatePixmap(register ClientPtr client)
|
||||
SProcCreatePixmap(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCreatePixmapReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -537,9 +537,9 @@ SProcCreatePixmap(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCreateGC(register ClientPtr client)
|
||||
SProcCreateGC(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCreateGCReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xCreateGCReq);
|
||||
|
@ -551,9 +551,9 @@ SProcCreateGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangeGC(register ClientPtr client)
|
||||
SProcChangeGC(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xChangeGCReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xChangeGCReq);
|
||||
|
@ -564,9 +564,9 @@ SProcChangeGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCopyGC(register ClientPtr client)
|
||||
SProcCopyGC(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCopyGCReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCopyGCReq);
|
||||
|
@ -577,9 +577,9 @@ SProcCopyGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcSetDashes(register ClientPtr client)
|
||||
SProcSetDashes(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xSetDashesReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xSetDashesReq);
|
||||
|
@ -591,9 +591,9 @@ SProcSetDashes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcSetClipRectangles(register ClientPtr client)
|
||||
SProcSetClipRectangles(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xSetClipRectanglesReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
|
||||
|
@ -605,9 +605,9 @@ SProcSetClipRectangles(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcClearToBackground(register ClientPtr client)
|
||||
SProcClearToBackground(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xClearAreaReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xClearAreaReq);
|
||||
|
@ -620,9 +620,9 @@ SProcClearToBackground(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCopyArea(register ClientPtr client)
|
||||
SProcCopyArea(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCopyAreaReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCopyAreaReq);
|
||||
|
@ -639,9 +639,9 @@ SProcCopyArea(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCopyPlane(register ClientPtr client)
|
||||
SProcCopyPlane(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCopyPlaneReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCopyPlaneReq);
|
||||
|
@ -661,9 +661,9 @@ SProcCopyPlane(register ClientPtr client)
|
|||
/* The following routine is used for all Poly drawing requests
|
||||
(except FillPoly, which uses a different request format) */
|
||||
int
|
||||
SProcPoly(register ClientPtr client)
|
||||
SProcPoly(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xPolyPointReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -678,9 +678,9 @@ SProcPoly(register ClientPtr client)
|
|||
is longer than xPolyPointReq, and we don't want to swap
|
||||
the difference as shorts! */
|
||||
int
|
||||
SProcFillPoly(register ClientPtr client)
|
||||
SProcFillPoly(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xFillPolyReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -692,9 +692,9 @@ SProcFillPoly(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcPutImage(register ClientPtr client)
|
||||
SProcPutImage(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xPutImageReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xPutImageReq);
|
||||
|
@ -710,9 +710,9 @@ SProcPutImage(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGetImage(register ClientPtr client)
|
||||
SProcGetImage(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGetImageReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGetImageReq);
|
||||
|
@ -728,9 +728,9 @@ SProcGetImage(register ClientPtr client)
|
|||
/* ProcPolyText used for both PolyText8 and PolyText16 */
|
||||
|
||||
int
|
||||
SProcPolyText(register ClientPtr client)
|
||||
SProcPolyText(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xPolyTextReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xPolyTextReq);
|
||||
|
@ -744,9 +744,9 @@ SProcPolyText(register ClientPtr client)
|
|||
/* ProcImageText used for both ImageText8 and ImageText16 */
|
||||
|
||||
int
|
||||
SProcImageText(register ClientPtr client)
|
||||
SProcImageText(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xImageTextReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xImageTextReq);
|
||||
|
@ -758,9 +758,9 @@ SProcImageText(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCreateColormap(register ClientPtr client)
|
||||
SProcCreateColormap(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCreateColormapReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCreateColormapReq);
|
||||
|
@ -772,9 +772,9 @@ SProcCreateColormap(register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
SProcCopyColormapAndFree(register ClientPtr client)
|
||||
SProcCopyColormapAndFree(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCopyColormapAndFreeReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq);
|
||||
|
@ -785,9 +785,9 @@ SProcCopyColormapAndFree(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcAllocColor(register ClientPtr client)
|
||||
SProcAllocColor(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xAllocColorReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xAllocColorReq);
|
||||
|
@ -799,9 +799,9 @@ SProcAllocColor(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcAllocNamedColor(register ClientPtr client)
|
||||
SProcAllocNamedColor(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xAllocNamedColorReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -812,9 +812,9 @@ SProcAllocNamedColor(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcAllocColorCells(register ClientPtr client)
|
||||
SProcAllocColorCells(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xAllocColorCellsReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xAllocColorCellsReq);
|
||||
|
@ -825,9 +825,9 @@ SProcAllocColorCells(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcAllocColorPlanes(register ClientPtr client)
|
||||
SProcAllocColorPlanes(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xAllocColorPlanesReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xAllocColorPlanesReq);
|
||||
|
@ -840,9 +840,9 @@ SProcAllocColorPlanes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcFreeColors(register ClientPtr client)
|
||||
SProcFreeColors(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xFreeColorsReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
|
||||
|
@ -856,7 +856,7 @@ SProcFreeColors(register ClientPtr client)
|
|||
_X_EXPORT void
|
||||
SwapColorItem(xColorItem *pItem)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swapl(&pItem->pixel, n);
|
||||
swaps(&pItem->red, n);
|
||||
|
@ -865,9 +865,9 @@ SwapColorItem(xColorItem *pItem)
|
|||
}
|
||||
|
||||
int
|
||||
SProcStoreColors(register ClientPtr client)
|
||||
SProcStoreColors(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
long count;
|
||||
xColorItem *pItem;
|
||||
|
||||
|
@ -882,9 +882,9 @@ SProcStoreColors(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcStoreNamedColor (register ClientPtr client)
|
||||
SProcStoreNamedColor (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xStoreNamedColorReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xStoreNamedColorReq);
|
||||
|
@ -895,9 +895,9 @@ SProcStoreNamedColor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcQueryColors (register ClientPtr client)
|
||||
SProcQueryColors (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xQueryColorsReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
|
||||
|
@ -907,9 +907,9 @@ SProcQueryColors (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcLookupColor (register ClientPtr client)
|
||||
SProcLookupColor (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xLookupColorReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xLookupColorReq);
|
||||
|
@ -919,9 +919,9 @@ SProcLookupColor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCreateCursor (register ClientPtr client)
|
||||
SProcCreateCursor (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCreateCursorReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCreateCursorReq);
|
||||
|
@ -940,9 +940,9 @@ SProcCreateCursor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCreateGlyphCursor (register ClientPtr client)
|
||||
SProcCreateGlyphCursor (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCreateGlyphCursorReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCreateGlyphCursorReq);
|
||||
|
@ -962,9 +962,9 @@ SProcCreateGlyphCursor (register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
SProcRecolorCursor (register ClientPtr client)
|
||||
SProcRecolorCursor (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xRecolorCursorReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xRecolorCursorReq);
|
||||
|
@ -979,9 +979,9 @@ SProcRecolorCursor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcQueryBestSize (register ClientPtr client)
|
||||
SProcQueryBestSize (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xQueryBestSizeReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xQueryBestSizeReq);
|
||||
|
@ -993,9 +993,9 @@ SProcQueryBestSize (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcQueryExtension (register ClientPtr client)
|
||||
SProcQueryExtension (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xQueryExtensionReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xQueryExtensionReq);
|
||||
|
@ -1004,9 +1004,9 @@ SProcQueryExtension (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangeKeyboardMapping (register ClientPtr client)
|
||||
SProcChangeKeyboardMapping (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xChangeKeyboardMappingReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq);
|
||||
|
@ -1016,9 +1016,9 @@ SProcChangeKeyboardMapping (register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
SProcChangeKeyboardControl (register ClientPtr client)
|
||||
SProcChangeKeyboardControl (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xChangeKeyboardControlReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq);
|
||||
|
@ -1028,9 +1028,9 @@ SProcChangeKeyboardControl (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangePointerControl (register ClientPtr client)
|
||||
SProcChangePointerControl (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xChangePointerControlReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xChangePointerControlReq);
|
||||
|
@ -1042,9 +1042,9 @@ SProcChangePointerControl (register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
SProcSetScreenSaver (register ClientPtr client)
|
||||
SProcSetScreenSaver (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xSetScreenSaverReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xSetScreenSaverReq);
|
||||
|
@ -1054,9 +1054,9 @@ SProcSetScreenSaver (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangeHosts (register ClientPtr client)
|
||||
SProcChangeHosts (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xChangeHostsReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -1066,9 +1066,9 @@ SProcChangeHosts (register ClientPtr client)
|
|||
|
||||
}
|
||||
|
||||
int SProcRotateProperties (register ClientPtr client)
|
||||
int SProcRotateProperties (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xRotatePropertiesReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xRotatePropertiesReq);
|
||||
|
@ -1080,9 +1080,9 @@ int SProcRotateProperties (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcNoOperation(register ClientPtr client)
|
||||
SProcNoOperation(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xReq);
|
||||
swaps(&stuff->length, n);
|
||||
return ((* ProcVector[X_NoOperation])(client));
|
||||
|
@ -1091,7 +1091,7 @@ SProcNoOperation(register ClientPtr client)
|
|||
void
|
||||
SwapConnClientPrefix(xConnClientPrefix *pCCP)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pCCP->majorVersion, n);
|
||||
swaps(&pCCP->minorVersion, n);
|
||||
|
|
320
dix/window.c
320
dix/window.c
|
@ -220,10 +220,10 @@ PrintWindowTree(void)
|
|||
#endif
|
||||
|
||||
_X_EXPORT int
|
||||
TraverseTree(register WindowPtr pWin, VisitWindowProcPtr func, pointer data)
|
||||
TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data)
|
||||
{
|
||||
register int result;
|
||||
register WindowPtr pChild;
|
||||
int result;
|
||||
WindowPtr pChild;
|
||||
|
||||
if (!(pChild = pWin))
|
||||
return(WT_NOMATCH);
|
||||
|
@ -269,7 +269,7 @@ Bool enableBackingStore = FALSE;
|
|||
Bool disableSaveUnders = FALSE;
|
||||
|
||||
static void
|
||||
SetWindowToDefaults(register WindowPtr pWin)
|
||||
SetWindowToDefaults(WindowPtr pWin)
|
||||
{
|
||||
pWin->prevSib = NullWindow;
|
||||
pWin->firstChild = NullWindow;
|
||||
|
@ -297,10 +297,6 @@ SetWindowToDefaults(register WindowPtr pWin)
|
|||
pWin->deliverableEvents = 0;
|
||||
pWin->dontPropagate = 0;
|
||||
pWin->forcedBS = FALSE;
|
||||
#ifdef NEED_DBE_BUF_BITS
|
||||
pWin->srcBuffer = DBE_FRONT_BUFFER;
|
||||
pWin->dstBuffer = DBE_FRONT_BUFFER;
|
||||
#endif
|
||||
#ifdef COMPOSITE
|
||||
pWin->redirectDraw = 0;
|
||||
#endif
|
||||
|
@ -313,8 +309,8 @@ MakeRootTile(WindowPtr pWin)
|
|||
GCPtr pGC;
|
||||
unsigned char back[128];
|
||||
int len = BitmapBytePad(sizeof(long));
|
||||
register unsigned char *from, *to;
|
||||
register int i, j;
|
||||
unsigned char *from, *to;
|
||||
int i, j;
|
||||
|
||||
pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
|
||||
pScreen->rootDepth);
|
||||
|
@ -353,11 +349,11 @@ WindowPtr
|
|||
AllocateWindow(ScreenPtr pScreen)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
register char *ptr;
|
||||
register DevUnion *ppriv;
|
||||
register unsigned *sizes;
|
||||
register unsigned size;
|
||||
register int i;
|
||||
char *ptr;
|
||||
DevUnion *ppriv;
|
||||
unsigned *sizes;
|
||||
unsigned size;
|
||||
int i;
|
||||
|
||||
pWin = (WindowPtr)xalloc(pScreen->totalWindowSize);
|
||||
if (pWin)
|
||||
|
@ -539,10 +535,10 @@ InitRootWindow(WindowPtr pWin)
|
|||
* window from which the region came.
|
||||
*/
|
||||
|
||||
void
|
||||
ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
|
||||
register int x, register int y,
|
||||
register int w, register int h)
|
||||
static void
|
||||
ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn,
|
||||
int x, int y,
|
||||
int w, int h)
|
||||
{
|
||||
ScreenPtr pScreen;
|
||||
BoxRec box;
|
||||
|
@ -579,7 +575,7 @@ RegisterRealChildHeadProc (RealChildHeadProc proc)
|
|||
|
||||
|
||||
WindowPtr
|
||||
RealChildHead(register WindowPtr pWin)
|
||||
RealChildHead(WindowPtr pWin)
|
||||
{
|
||||
if (realChildHeadProc) {
|
||||
return realChildHeadProc (pWin);
|
||||
|
@ -599,19 +595,19 @@ RealChildHead(register WindowPtr pWin)
|
|||
*****/
|
||||
|
||||
_X_EXPORT WindowPtr
|
||||
CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
|
||||
unsigned h, unsigned bw, unsigned class, register Mask vmask, XID *vlist,
|
||||
CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
|
||||
unsigned h, unsigned bw, unsigned class, Mask vmask, XID *vlist,
|
||||
int depth, ClientPtr client, VisualID visual, int *error)
|
||||
{
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
WindowPtr pHead;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
xEvent event;
|
||||
int idepth, ivisual;
|
||||
Bool fOK;
|
||||
DepthPtr pDepth;
|
||||
PixmapFormatRec *format;
|
||||
register WindowOptPtr ancwopt;
|
||||
WindowOptPtr ancwopt;
|
||||
|
||||
if (class == CopyFromParent)
|
||||
class = pParent->drawable.class;
|
||||
|
@ -836,9 +832,29 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
|
|||
}
|
||||
|
||||
static void
|
||||
FreeWindowResources(register WindowPtr pWin)
|
||||
DisposeWindowOptional (WindowPtr pWin)
|
||||
{
|
||||
register ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
if (!pWin->optional)
|
||||
return;
|
||||
/*
|
||||
* everything is peachy. Delete the optional record
|
||||
* and clean up
|
||||
*/
|
||||
if (pWin->optional->cursor)
|
||||
{
|
||||
FreeCursor (pWin->optional->cursor, (Cursor)0);
|
||||
pWin->cursorIsNone = FALSE;
|
||||
}
|
||||
else
|
||||
pWin->cursorIsNone = TRUE;
|
||||
xfree (pWin->optional);
|
||||
pWin->optional = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
FreeWindowResources(WindowPtr pWin)
|
||||
{
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
|
||||
DeleteWindowFromAnySaveSet(pWin);
|
||||
DeleteWindowFromAnySelections(pWin);
|
||||
|
@ -869,7 +885,7 @@ FreeWindowResources(register WindowPtr pWin)
|
|||
static void
|
||||
CrushTree(WindowPtr pWin)
|
||||
{
|
||||
register WindowPtr pChild, pSib, pParent;
|
||||
WindowPtr pChild, pSib, pParent;
|
||||
UnrealizeWindowProcPtr UnrealizeWindow;
|
||||
xEvent event;
|
||||
|
||||
|
@ -926,8 +942,8 @@ CrushTree(WindowPtr pWin)
|
|||
int
|
||||
DeleteWindow(pointer value, XID wid)
|
||||
{
|
||||
register WindowPtr pParent;
|
||||
register WindowPtr pWin = (WindowPtr)value;
|
||||
WindowPtr pParent;
|
||||
WindowPtr pWin = (WindowPtr)value;
|
||||
xEvent event;
|
||||
|
||||
UnmapWindow(pWin, FALSE);
|
||||
|
@ -959,7 +975,7 @@ DeleteWindow(pointer value, XID wid)
|
|||
}
|
||||
|
||||
void
|
||||
DestroySubwindows(register WindowPtr pWin, ClientPtr client)
|
||||
DestroySubwindows(WindowPtr pWin, ClientPtr client)
|
||||
{
|
||||
/* XXX
|
||||
* The protocol is quite clear that each window should be
|
||||
|
@ -986,10 +1002,10 @@ DestroySubwindows(register WindowPtr pWin, ClientPtr client)
|
|||
*****/
|
||||
|
||||
_X_EXPORT int
|
||||
ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
||||
ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
||||
{
|
||||
register Mask index2;
|
||||
register XID *pVlist;
|
||||
Mask index2;
|
||||
XID *pVlist;
|
||||
PixmapPtr pPixmap;
|
||||
Pixmap pixID;
|
||||
CursorPtr pCursor, pOldCursor;
|
||||
|
@ -999,9 +1015,9 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
|
|||
ColormapPtr pCmap;
|
||||
xEvent xE;
|
||||
int result;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
Mask vmaskCopy = 0;
|
||||
register Mask tmask;
|
||||
Mask tmask;
|
||||
unsigned int val;
|
||||
int error;
|
||||
Bool checkOptional = FALSE;
|
||||
|
@ -1520,7 +1536,7 @@ PatchUp:
|
|||
*****/
|
||||
|
||||
void
|
||||
GetWindowAttributes(register WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply *wa)
|
||||
GetWindowAttributes(WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply *wa)
|
||||
{
|
||||
wa->type = X_Reply;
|
||||
wa->bitGravity = pWin->bitGravity;
|
||||
|
@ -1556,9 +1572,9 @@ GetWindowAttributes(register WindowPtr pWin, ClientPtr client, xGetWindowAttribu
|
|||
|
||||
|
||||
_X_EXPORT WindowPtr
|
||||
MoveWindowInStack(register WindowPtr pWin, register WindowPtr pNextSib)
|
||||
MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib)
|
||||
{
|
||||
register WindowPtr pParent = pWin->parent;
|
||||
WindowPtr pParent = pWin->parent;
|
||||
WindowPtr pFirstChange = pWin; /* highest window where list changes */
|
||||
|
||||
if (pWin->nextSib != pNextSib)
|
||||
|
@ -1640,7 +1656,7 @@ MoveWindowInStack(register WindowPtr pWin, register WindowPtr pNextSib)
|
|||
}
|
||||
|
||||
_X_EXPORT RegionPtr
|
||||
CreateUnclippedWinSize (register WindowPtr pWin)
|
||||
CreateUnclippedWinSize (WindowPtr pWin)
|
||||
{
|
||||
RegionPtr pRgn;
|
||||
BoxRec box;
|
||||
|
@ -1668,7 +1684,7 @@ CreateUnclippedWinSize (register WindowPtr pWin)
|
|||
}
|
||||
|
||||
_X_EXPORT void
|
||||
SetWinSize (register WindowPtr pWin)
|
||||
SetWinSize (WindowPtr pWin)
|
||||
{
|
||||
#ifdef COMPOSITE
|
||||
if (pWin->redirectDraw)
|
||||
|
@ -1707,7 +1723,7 @@ SetWinSize (register WindowPtr pWin)
|
|||
}
|
||||
|
||||
_X_EXPORT void
|
||||
SetBorderSize (register WindowPtr pWin)
|
||||
SetBorderSize (WindowPtr pWin)
|
||||
{
|
||||
int bw;
|
||||
|
||||
|
@ -1759,9 +1775,9 @@ SetBorderSize (register WindowPtr pWin)
|
|||
*/
|
||||
|
||||
_X_EXPORT void
|
||||
GravityTranslate (register int x, register int y, int oldx, int oldy,
|
||||
GravityTranslate (int x, int y, int oldx, int oldy,
|
||||
int dw, int dh, unsigned gravity,
|
||||
register int *destx, register int *desty)
|
||||
int *destx, int *desty)
|
||||
{
|
||||
switch (gravity) {
|
||||
case NorthGravity:
|
||||
|
@ -1809,10 +1825,10 @@ GravityTranslate (register int x, register int y, int oldx, int oldy,
|
|||
|
||||
/* XXX need to retile border on each window with ParentRelative origin */
|
||||
_X_EXPORT void
|
||||
ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh)
|
||||
ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh)
|
||||
{
|
||||
register ScreenPtr pScreen;
|
||||
register WindowPtr pSib, pChild;
|
||||
ScreenPtr pScreen;
|
||||
WindowPtr pSib, pChild;
|
||||
Bool resized = (dw || dh);
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
|
@ -1904,10 +1920,10 @@ ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh)
|
|||
|
||||
static int
|
||||
IsSiblingAboveMe(
|
||||
register WindowPtr pMe,
|
||||
register WindowPtr pSib)
|
||||
WindowPtr pMe,
|
||||
WindowPtr pSib)
|
||||
{
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
|
||||
pWin = pMe->parent->firstChild;
|
||||
while (pWin)
|
||||
|
@ -1923,8 +1939,8 @@ IsSiblingAboveMe(
|
|||
|
||||
static BoxPtr
|
||||
WindowExtents(
|
||||
register WindowPtr pWin,
|
||||
register BoxPtr pBox)
|
||||
WindowPtr pWin,
|
||||
BoxPtr pBox)
|
||||
{
|
||||
pBox->x1 = pWin->drawable.x - wBorderWidth (pWin);
|
||||
pBox->y1 = pWin->drawable.y - wBorderWidth (pWin);
|
||||
|
@ -1940,7 +1956,7 @@ WindowExtents(
|
|||
|
||||
static RegionPtr
|
||||
MakeBoundingRegion (
|
||||
register WindowPtr pWin,
|
||||
WindowPtr pWin,
|
||||
BoxPtr pBox)
|
||||
{
|
||||
RegionPtr pRgn;
|
||||
|
@ -1966,7 +1982,7 @@ ShapeOverlap (
|
|||
BoxPtr pSibBox)
|
||||
{
|
||||
RegionPtr pWinRgn, pSibRgn;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
Bool ret;
|
||||
|
||||
if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib))
|
||||
|
@ -1986,11 +2002,11 @@ static Bool
|
|||
AnyWindowOverlapsMe(
|
||||
WindowPtr pWin,
|
||||
WindowPtr pHead,
|
||||
register BoxPtr box)
|
||||
BoxPtr box)
|
||||
{
|
||||
register WindowPtr pSib;
|
||||
WindowPtr pSib;
|
||||
BoxRec sboxrec;
|
||||
register BoxPtr sbox;
|
||||
BoxPtr sbox;
|
||||
|
||||
for (pSib = pWin->prevSib; pSib != pHead; pSib = pSib->prevSib)
|
||||
{
|
||||
|
@ -2011,11 +2027,11 @@ AnyWindowOverlapsMe(
|
|||
static Bool
|
||||
IOverlapAnyWindow(
|
||||
WindowPtr pWin,
|
||||
register BoxPtr box)
|
||||
BoxPtr box)
|
||||
{
|
||||
register WindowPtr pSib;
|
||||
WindowPtr pSib;
|
||||
BoxRec sboxrec;
|
||||
register BoxPtr sbox;
|
||||
BoxPtr sbox;
|
||||
|
||||
for (pSib = pWin->nextSib; pSib; pSib = pSib->nextSib)
|
||||
{
|
||||
|
@ -2063,8 +2079,8 @@ IOverlapAnyWindow(
|
|||
|
||||
static WindowPtr
|
||||
WhereDoIGoInTheStack(
|
||||
register WindowPtr pWin,
|
||||
register WindowPtr pSib,
|
||||
WindowPtr pWin,
|
||||
WindowPtr pSib,
|
||||
short x,
|
||||
short y,
|
||||
unsigned short w,
|
||||
|
@ -2072,7 +2088,7 @@ WhereDoIGoInTheStack(
|
|||
int smode)
|
||||
{
|
||||
BoxRec box;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
WindowPtr pHead, pFirst;
|
||||
|
||||
if ((pWin == pWin->parent->firstChild) &&
|
||||
|
@ -2169,8 +2185,8 @@ WhereDoIGoInTheStack(
|
|||
|
||||
static void
|
||||
ReflectStackChange(
|
||||
register WindowPtr pWin,
|
||||
register WindowPtr pSib,
|
||||
WindowPtr pWin,
|
||||
WindowPtr pSib,
|
||||
VTKind kind)
|
||||
{
|
||||
/* Note that pSib might be NULL */
|
||||
|
@ -2222,17 +2238,17 @@ ReflectStackChange(
|
|||
*****/
|
||||
|
||||
int
|
||||
ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientPtr client)
|
||||
ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
|
||||
{
|
||||
#define RESTACK_WIN 0
|
||||
#define MOVE_WIN 1
|
||||
#define RESIZE_WIN 2
|
||||
#define REBORDER_WIN 3
|
||||
register WindowPtr pSib = NullWindow;
|
||||
register WindowPtr pParent = pWin->parent;
|
||||
WindowPtr pSib = NullWindow;
|
||||
WindowPtr pParent = pWin->parent;
|
||||
Window sibwid = 0;
|
||||
Mask index2, tmask;
|
||||
register XID *pVlist;
|
||||
XID *pVlist;
|
||||
short x, y, beforeX, beforeY;
|
||||
unsigned short w = pWin->drawable.width,
|
||||
h = pWin->drawable.height,
|
||||
|
@ -2509,7 +2525,7 @@ ActuallyDoSomething:
|
|||
int
|
||||
CirculateWindow(WindowPtr pParent, int direction, ClientPtr client)
|
||||
{
|
||||
register WindowPtr pWin, pHead, pFirst;
|
||||
WindowPtr pWin, pHead, pFirst;
|
||||
xEvent event;
|
||||
BoxRec box;
|
||||
|
||||
|
@ -2579,14 +2595,14 @@ CompareWIDs(
|
|||
*****/
|
||||
|
||||
int
|
||||
ReparentWindow(register WindowPtr pWin, register WindowPtr pParent,
|
||||
ReparentWindow(WindowPtr pWin, WindowPtr pParent,
|
||||
int x, int y, ClientPtr client)
|
||||
{
|
||||
WindowPtr pPrev, pPriorParent;
|
||||
Bool WasMapped = (Bool)(pWin->mapped);
|
||||
xEvent event;
|
||||
int bw = wBorderWidth (pWin);
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
if (TraverseTree(pWin, CompareWIDs, (pointer)&pParent->drawable.id) == WT_STOPWALKING)
|
||||
|
@ -2673,7 +2689,7 @@ ReparentWindow(register WindowPtr pWin, register WindowPtr pParent,
|
|||
static void
|
||||
RealizeTree(WindowPtr pWin)
|
||||
{
|
||||
register WindowPtr pChild;
|
||||
WindowPtr pChild;
|
||||
RealizeWindowProcPtr Realize;
|
||||
|
||||
Realize = pWin->drawable.pScreen->RealizeWindow;
|
||||
|
@ -2703,6 +2719,30 @@ RealizeTree(WindowPtr pWin)
|
|||
}
|
||||
}
|
||||
|
||||
static WindowPtr windowDisableMapUnmapEvents;
|
||||
|
||||
void
|
||||
DisableMapUnmapEvents(WindowPtr pWin)
|
||||
{
|
||||
assert (windowDisableMapUnmapEvents == NULL);
|
||||
|
||||
windowDisableMapUnmapEvents = pWin;
|
||||
}
|
||||
|
||||
void
|
||||
EnableMapUnmapEvents(WindowPtr pWin)
|
||||
{
|
||||
assert (windowDisableMapUnmapEvents != NULL);
|
||||
|
||||
windowDisableMapUnmapEvents = NULL;
|
||||
}
|
||||
|
||||
static Bool
|
||||
MapUnmapEventsEnabled(WindowPtr pWin)
|
||||
{
|
||||
return pWin != windowDisableMapUnmapEvents;
|
||||
}
|
||||
|
||||
/*****
|
||||
* MapWindow
|
||||
* If some other client has selected SubStructureReDirect on the parent
|
||||
|
@ -2712,11 +2752,11 @@ RealizeTree(WindowPtr pWin)
|
|||
*****/
|
||||
|
||||
_X_EXPORT int
|
||||
MapWindow(register WindowPtr pWin, ClientPtr client)
|
||||
MapWindow(WindowPtr pWin, ClientPtr client)
|
||||
{
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
|
||||
register WindowPtr pParent;
|
||||
WindowPtr pParent;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
Bool dosave = FALSE;
|
||||
#endif
|
||||
|
@ -2832,18 +2872,18 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
|
|||
*****/
|
||||
|
||||
void
|
||||
MapSubwindows(register WindowPtr pParent, ClientPtr client)
|
||||
MapSubwindows(WindowPtr pParent, ClientPtr client)
|
||||
{
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pFirstMapped = NullWindow;
|
||||
WindowPtr pWin;
|
||||
WindowPtr pFirstMapped = NullWindow;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
WindowPtr pFirstSaveUndered = NullWindow;
|
||||
WindowPtr pFirstSaveUndered = NullWindow;
|
||||
#endif
|
||||
register ScreenPtr pScreen;
|
||||
register Mask parentRedirect;
|
||||
register Mask parentNotify;
|
||||
xEvent event;
|
||||
Bool anyMarked;
|
||||
ScreenPtr pScreen;
|
||||
Mask parentRedirect;
|
||||
Mask parentNotify;
|
||||
xEvent event;
|
||||
Bool anyMarked;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
Bool dosave = FALSE;
|
||||
#endif
|
||||
|
@ -2952,7 +2992,7 @@ UnrealizeTree(
|
|||
WindowPtr pWin,
|
||||
Bool fromConfigure)
|
||||
{
|
||||
register WindowPtr pChild;
|
||||
WindowPtr pChild;
|
||||
UnrealizeWindowProcPtr Unrealize;
|
||||
MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
|
||||
|
||||
|
@ -3011,9 +3051,9 @@ UnrealizeTree(
|
|||
*****/
|
||||
|
||||
_X_EXPORT int
|
||||
UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
|
||||
UnmapWindow(WindowPtr pWin, Bool fromConfigure)
|
||||
{
|
||||
register WindowPtr pParent;
|
||||
WindowPtr pParent;
|
||||
xEvent event;
|
||||
Bool wasRealized = (Bool)pWin->realized;
|
||||
Bool wasViewable = (Bool)pWin->viewable;
|
||||
|
@ -3070,9 +3110,9 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
|
|||
*****/
|
||||
|
||||
void
|
||||
UnmapSubwindows(register WindowPtr pWin)
|
||||
UnmapSubwindows(WindowPtr pWin)
|
||||
{
|
||||
register WindowPtr pChild, pHead;
|
||||
WindowPtr pChild, pHead;
|
||||
xEvent event;
|
||||
Bool wasRealized = (Bool)pWin->realized;
|
||||
Bool wasViewable = (Bool)pWin->viewable;
|
||||
|
@ -3161,10 +3201,10 @@ UnmapSubwindows(register WindowPtr pWin)
|
|||
|
||||
|
||||
void
|
||||
HandleSaveSet(register ClientPtr client)
|
||||
HandleSaveSet(ClientPtr client)
|
||||
{
|
||||
register WindowPtr pParent, pWin;
|
||||
register int j;
|
||||
WindowPtr pParent, pWin;
|
||||
int j;
|
||||
|
||||
for (j=0; j<client->numSaved; j++)
|
||||
{
|
||||
|
@ -3201,27 +3241,12 @@ HandleSaveSet(register ClientPtr client)
|
|||
client->saveSet = (SaveSetElt *)NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* \param x,y in root
|
||||
* \param box "return" value
|
||||
*/
|
||||
Bool
|
||||
VisibleBoundingBoxFromPoint(register WindowPtr pWin, int x, int y, BoxPtr box)
|
||||
{
|
||||
if (!pWin->realized)
|
||||
return (FALSE);
|
||||
if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->clipList, x, y, box))
|
||||
return(TRUE);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* \param x,y in root
|
||||
*/
|
||||
Bool
|
||||
PointInWindowIsVisible(register WindowPtr pWin, int x, int y)
|
||||
PointInWindowIsVisible(WindowPtr pWin, int x, int y)
|
||||
{
|
||||
BoxRec box;
|
||||
|
||||
|
@ -3240,9 +3265,9 @@ PointInWindowIsVisible(register WindowPtr pWin, int x, int y)
|
|||
|
||||
|
||||
_X_EXPORT RegionPtr
|
||||
NotClippedByChildren(register WindowPtr pWin)
|
||||
NotClippedByChildren(WindowPtr pWin)
|
||||
{
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
RegionPtr pReg;
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
|
@ -3324,30 +3349,6 @@ SendVisibilityNotify(WindowPtr pWin)
|
|||
DeliverEvents(pWin, &event, 1, NullWindow);
|
||||
}
|
||||
|
||||
static WindowPtr windowDisableMapUnmapEvents;
|
||||
|
||||
void
|
||||
DisableMapUnmapEvents(WindowPtr pWin)
|
||||
{
|
||||
assert (windowDisableMapUnmapEvents == NULL);
|
||||
|
||||
windowDisableMapUnmapEvents = pWin;
|
||||
}
|
||||
|
||||
void
|
||||
EnableMapUnmapEvents(WindowPtr pWin)
|
||||
{
|
||||
assert (windowDisableMapUnmapEvents != NULL);
|
||||
|
||||
windowDisableMapUnmapEvents = NULL;
|
||||
}
|
||||
|
||||
Bool
|
||||
MapUnmapEventsEnabled(WindowPtr pWin)
|
||||
{
|
||||
return pWin != windowDisableMapUnmapEvents;
|
||||
}
|
||||
|
||||
#define RANDOM_WIDTH 32
|
||||
|
||||
#ifndef NOLOGOHACK
|
||||
|
@ -3588,7 +3589,7 @@ TileScreenSaver(int i, int kind)
|
|||
*/
|
||||
|
||||
_X_EXPORT WindowPtr
|
||||
FindWindowWithOptional (register WindowPtr w)
|
||||
FindWindowWithOptional (WindowPtr w)
|
||||
{
|
||||
do
|
||||
w = w->parent;
|
||||
|
@ -3605,10 +3606,10 @@ FindWindowWithOptional (register WindowPtr w)
|
|||
*/
|
||||
|
||||
_X_EXPORT void
|
||||
CheckWindowOptionalNeed (register WindowPtr w)
|
||||
CheckWindowOptionalNeed (WindowPtr w)
|
||||
{
|
||||
register WindowOptPtr optional;
|
||||
register WindowOptPtr parentOptional;
|
||||
WindowOptPtr optional;
|
||||
WindowOptPtr parentOptional;
|
||||
|
||||
if (!w->parent)
|
||||
return;
|
||||
|
@ -3659,10 +3660,10 @@ CheckWindowOptionalNeed (register WindowPtr w)
|
|||
*/
|
||||
|
||||
_X_EXPORT Bool
|
||||
MakeWindowOptional (register WindowPtr pWin)
|
||||
MakeWindowOptional (WindowPtr pWin)
|
||||
{
|
||||
register WindowOptPtr optional;
|
||||
register WindowOptPtr parentOptional;
|
||||
WindowOptPtr optional;
|
||||
WindowOptPtr parentOptional;
|
||||
|
||||
if (pWin->optional)
|
||||
return TRUE;
|
||||
|
@ -3700,41 +3701,6 @@ MakeWindowOptional (register WindowPtr pWin)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
DisposeWindowOptional (register WindowPtr pWin)
|
||||
{
|
||||
if (!pWin->optional)
|
||||
return;
|
||||
/*
|
||||
* everything is peachy. Delete the optional record
|
||||
* and clean up
|
||||
*/
|
||||
/*
|
||||
* TOG changed this code to:
|
||||
*
|
||||
* if (pWin->cursorIsNone == FALSE)
|
||||
* FreeCursor (pWin->optional->cursor, (Cursor)0);
|
||||
* pWin->cursorIsNone = TRUE;
|
||||
*
|
||||
* This is blatently wrong; windows without optionals can have
|
||||
* two different cursor values, either None or sharing their
|
||||
* parents cursor. This difference is controlled by the
|
||||
* cursorIsNone value; when TRUE, the window has no cursor,
|
||||
* when false, it shares its cursor with its parent; TOG
|
||||
* made it impossible for a window to have a cursor without
|
||||
* an optional record.
|
||||
*/
|
||||
if (pWin->optional->cursor)
|
||||
{
|
||||
FreeCursor (pWin->optional->cursor, (Cursor)0);
|
||||
pWin->cursorIsNone = FALSE;
|
||||
}
|
||||
else
|
||||
pWin->cursorIsNone = TRUE;
|
||||
xfree (pWin->optional);
|
||||
pWin->optional = NULL;
|
||||
}
|
||||
|
||||
#ifndef NOLOGOHACK
|
||||
static void
|
||||
DrawLogo(WindowPtr pWin)
|
||||
|
|
|
@ -1,25 +1,35 @@
|
|||
appmandir = $(APP_MAN_DIR)
|
||||
filemandir = $(FILE_MAN_DIR)
|
||||
|
||||
# Xserver.man covers options generic to all X servers built in this tree
|
||||
# (i.e. those handled in the os/utils.c options processing instead of in
|
||||
# the DDX-level options processing)
|
||||
appman_PRE = Xserver.man.pre
|
||||
fileman_PRE = SecurityPolicy.man.pre
|
||||
|
||||
appman_PROCESSED = $(appman_PRE:man.pre=man)
|
||||
fileman_PROCESSED = $(fileman_PRE:man.pre=man)
|
||||
|
||||
appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@)
|
||||
fileman_DATA = $(fileman_PRE:man.pre=@FILE_MAN_SUFFIX@)
|
||||
|
||||
BUILT_SOURCES = $(appman_PROCESSED)
|
||||
BUILT_SOURCES = $(appman_PROCESSED) $(fileman_PROCESSED)
|
||||
|
||||
CLEANFILES = $(appman_PROCESSED) $(appman_DATA)
|
||||
CLEANFILES = $(appman_PROCESSED) $(appman_DATA) \
|
||||
$(fileman_PROCESSED) $(fileman_DATA)
|
||||
|
||||
include $(top_srcdir)/cpprules.in
|
||||
|
||||
.man.$(APP_MAN_SUFFIX):
|
||||
cp $< $@
|
||||
|
||||
.man.$(FILE_MAN_SUFFIX):
|
||||
cp $< $@
|
||||
|
||||
EXTRAMANDEFS = -D__default_font_path__="`echo $(COMPILEDDEFAULTFONTPATH) | sed -e 's/,/, /g'`"
|
||||
|
||||
# Docs about X server internals that we ship with source but don't install
|
||||
DEVEL_DOCS = smartsched
|
||||
|
||||
|
||||
EXTRA_DIST = $(DEVEL_DOCS) $(appman_PRE)
|
||||
EXTRA_DIST = $(DEVEL_DOCS) $(appman_PRE) $(fileman_PRE)
|
||||
|
|
258
doc/SecurityPolicy.man.pre
Normal file
258
doc/SecurityPolicy.man.pre
Normal file
|
@ -0,0 +1,258 @@
|
|||
.\" Split out of Xserver.man, which was covered by this notice:
|
||||
.\" Copyright 1984 - 1991, 1993, 1994, 1998 The Open Group
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, distribute, and sell this software and its
|
||||
.\" documentation for any purpose is hereby granted without fee, provided that
|
||||
.\" the above copyright notice appear in all copies and that both that
|
||||
.\" copyright notice and this permission notice appear in supporting
|
||||
.\" documentation.
|
||||
.\"
|
||||
.\" The above copyright notice and this permission notice shall be included
|
||||
.\" in all copies or substantial portions of the Software.
|
||||
.\"
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
.\" OTHER DEALINGS IN THE SOFTWARE.
|
||||
.\"
|
||||
.\" Except as contained in this notice, the name of The Open Group shall
|
||||
.\" not be used in advertising or otherwise to promote the sale, use or
|
||||
.\" other dealings in this Software without prior written authorization
|
||||
.\" from The Open Group.
|
||||
.\" $XFree86: xc/programs/Xserver/Xserver.man,v 3.31 2004/01/10 22:27:46 dawes Exp $
|
||||
.\" shorthand for double quote that works everywhere.
|
||||
.ds q \N'34'
|
||||
.TH SecurityPolicy __filemansuffix__ __xorgversion__
|
||||
.SH NAME
|
||||
SecurityPolicy \- X Window System SECURITY Extension Policy file format
|
||||
.SH DESCRIPTION
|
||||
The SECURITY extension to the X Window System uses a policy file to determine
|
||||
which operations should be allowed or denied. The default location for this
|
||||
file is
|
||||
.IR __projectroot__/lib/xserver/SecurityPolicy .
|
||||
.PP
|
||||
The syntax of the security policy file is as follows.
|
||||
Notation: "*" means zero or more occurrences of the preceding element,
|
||||
and "+" means one or more occurrences. To interpret <foo/bar>, ignore
|
||||
the text after the /; it is used to distinguish between instances of
|
||||
<foo> in the next section.
|
||||
.PP
|
||||
.nf
|
||||
<policy file> ::= <version line> <other line>*
|
||||
|
||||
<version line> ::= <string/v> '\en'
|
||||
|
||||
<other line > ::= <comment> | <access rule> | <site policy> | <blank line>
|
||||
|
||||
<comment> ::= # <not newline>* '\en'
|
||||
|
||||
<blank line> ::= <space> '\en'
|
||||
|
||||
<site policy> ::= sitepolicy <string/sp> '\en'
|
||||
|
||||
<access rule> ::= property <property/ar> <window> <perms> '\en'
|
||||
|
||||
<property> ::= <string>
|
||||
|
||||
<window> ::= any | root | <required property>
|
||||
|
||||
<required property> ::= <property/rp> | <property with value>
|
||||
|
||||
<property with value> ::= <property/rpv> = <string/rv>
|
||||
|
||||
<perms> ::= [ <operation> | <action> | <space> ]*
|
||||
|
||||
<operation> ::= r | w | d
|
||||
|
||||
<action> ::= a | i | e
|
||||
|
||||
<string> ::= <dbl quoted string> | <single quoted string> | <unquoted string>
|
||||
|
||||
<dbl quoted string> ::= <space> " <not dquote>* " <space>
|
||||
|
||||
<single quoted string> ::= <space> ' <not squote>* ' <space>
|
||||
|
||||
<unquoted string> ::= <space> <not space>+ <space>
|
||||
|
||||
<space> ::= [ ' ' | '\et' ]*
|
||||
|
||||
Character sets:
|
||||
|
||||
<not newline> ::= any character except '\en'
|
||||
<not dquote> ::= any character except "
|
||||
<not squote> ::= any character except '
|
||||
<not space> ::= any character except those in <space>
|
||||
.fi
|
||||
.PP
|
||||
The semantics associated with the above syntax are as follows.
|
||||
.PP
|
||||
<version line>, the first line in the file, specifies the file format
|
||||
version. If the server does not recognize the version <string/v>, it
|
||||
ignores the rest of the file. The version string for the file format
|
||||
described here is "version-1" .
|
||||
.PP
|
||||
Once past the <version line>, lines that do not match the above syntax
|
||||
are ignored.
|
||||
.PP
|
||||
<comment> lines are ignored.
|
||||
.PP
|
||||
<sitepolicy> lines are currently ignored. They are intended to
|
||||
specify the site policies used by the XC-QUERY-SECURITY-1
|
||||
authorization method.
|
||||
.PP
|
||||
<access rule> lines specify how the server should react to untrusted
|
||||
client requests that affect the X Window property named <property/ar>.
|
||||
The rest of this section describes the interpretation of an
|
||||
<access rule>.
|
||||
.PP
|
||||
For an <access rule> to apply to a given instance of <property/ar>,
|
||||
<property/ar> must be on a window that is in the set of windows
|
||||
specified by <window>. If <window> is any, the rule applies to
|
||||
<property/ar> on any window. If <window> is root, the rule applies to
|
||||
<property/ar> only on root windows.
|
||||
.PP
|
||||
If <window> is <required property>, the following apply. If <required
|
||||
property> is a <property/rp>, the rule applies when the window also
|
||||
has that <property/rp>, regardless of its value. If <required
|
||||
property> is a <property with value>, <property/rpv> must also have
|
||||
the value specified by <string/rv>. In this case, the property must
|
||||
have type STRING and format 8, and should contain one or more
|
||||
null-terminated strings. If any of the strings match <string/rv>, the
|
||||
rule applies.
|
||||
.PP
|
||||
The definition of string matching is simple case-sensitive string
|
||||
comparison with one elaboration: the occurrence of the character '*' in
|
||||
<string/rv> is a wildcard meaning "any string." A <string/rv> can
|
||||
contain multiple wildcards anywhere in the string. For example, "x*"
|
||||
matches strings that begin with x, "*x" matches strings that end with
|
||||
x, "*x*" matches strings containing x, and "x*y*" matches strings that
|
||||
start with x and subsequently contain y.
|
||||
.PP
|
||||
There may be multiple <access rule> lines for a given <property/ar>.
|
||||
The rules are tested in the order that they appear in the file. The
|
||||
first rule that applies is used.
|
||||
.PP
|
||||
<perms> specify operations that untrusted clients may attempt, and
|
||||
the actions that the server should take in response to those operations.
|
||||
.PP
|
||||
<operation> can be r (read), w (write), or d (delete). The following
|
||||
table shows how X Protocol property requests map to these operations
|
||||
in the X.Org server implementation.
|
||||
.PP
|
||||
.nf
|
||||
GetProperty r, or r and d if delete = True
|
||||
ChangeProperty w
|
||||
RotateProperties r and w
|
||||
DeleteProperty d
|
||||
ListProperties none, untrusted clients can always list all properties
|
||||
.fi
|
||||
.PP
|
||||
<action> can be a (allow), i (ignore), or e (error). Allow means
|
||||
execute the request as if it had been issued by a trusted client.
|
||||
Ignore means treat the request as a no-op. In the case of
|
||||
GetProperty, ignore means return an empty property value if the
|
||||
property exists, regardless of its actual value. Error means do not
|
||||
execute the request and return a BadAtom error with the atom set to
|
||||
the property name. Error is the default action for all properties,
|
||||
including those not listed in the security policy file.
|
||||
.PP
|
||||
An <action> applies to all <operation>s that follow it, until the next
|
||||
<action> is encountered. Thus, irwad means ignore read and write,
|
||||
allow delete.
|
||||
.PP
|
||||
GetProperty and RotateProperties may do multiple operations (r and d,
|
||||
or r and w). If different actions apply to the operations, the most
|
||||
severe action is applied to the whole request; there is no partial
|
||||
request execution. The severity ordering is: allow < ignore < error.
|
||||
Thus, if the <perms> for a property are ired (ignore read, error
|
||||
delete), and an untrusted client attempts GetProperty on that property
|
||||
with delete = True, an error is returned, but the property value is
|
||||
not. Similarly, if any of the properties in a RotateProperties do not
|
||||
allow both read and write, an error is returned without changing any
|
||||
property values.
|
||||
.PP
|
||||
Here is an example security policy file.
|
||||
.PP
|
||||
.ta 3i 4i
|
||||
.nf
|
||||
version-1
|
||||
|
||||
XCOMM Allow reading of application resources, but not writing.
|
||||
property RESOURCE_MANAGER root ar iw
|
||||
property SCREEN_RESOURCES root ar iw
|
||||
|
||||
XCOMM Ignore attempts to use cut buffers. Giving errors causes apps to crash,
|
||||
XCOMM and allowing access may give away too much information.
|
||||
property CUT_BUFFER0 root irw
|
||||
property CUT_BUFFER1 root irw
|
||||
property CUT_BUFFER2 root irw
|
||||
property CUT_BUFFER3 root irw
|
||||
property CUT_BUFFER4 root irw
|
||||
property CUT_BUFFER5 root irw
|
||||
property CUT_BUFFER6 root irw
|
||||
property CUT_BUFFER7 root irw
|
||||
|
||||
XCOMM If you are using Motif, you probably want these.
|
||||
property _MOTIF_DEFAULT_BINDINGS root ar iw
|
||||
property _MOTIF_DRAG_WINDOW root ar iw
|
||||
property _MOTIF_DRAG_TARGETS any ar iw
|
||||
property _MOTIF_DRAG_ATOMS any ar iw
|
||||
property _MOTIF_DRAG_ATOM_PAIRS any ar iw
|
||||
|
||||
XCOMM The next two rules let xwininfo -tree work when untrusted.
|
||||
property WM_NAME any ar
|
||||
|
||||
XCOMM Allow read of WM_CLASS, but only for windows with WM_NAME.
|
||||
XCOMM This might be more restrictive than necessary, but demonstrates
|
||||
XCOMM the <required property> facility, and is also an attempt to
|
||||
XCOMM say "top level windows only."
|
||||
property WM_CLASS WM_NAME ar
|
||||
|
||||
XCOMM These next three let xlsclients work untrusted. Think carefully
|
||||
XCOMM before including these; giving away the client machine name and command
|
||||
XCOMM may be exposing too much.
|
||||
property WM_STATE WM_NAME ar
|
||||
property WM_CLIENT_MACHINE WM_NAME ar
|
||||
property WM_COMMAND WM_NAME ar
|
||||
|
||||
XCOMM To let untrusted clients use the standard colormaps created by
|
||||
XCOMM xstdcmap, include these lines.
|
||||
property RGB_DEFAULT_MAP root ar
|
||||
property RGB_BEST_MAP root ar
|
||||
property RGB_RED_MAP root ar
|
||||
property RGB_GREEN_MAP root ar
|
||||
property RGB_BLUE_MAP root ar
|
||||
property RGB_GRAY_MAP root ar
|
||||
|
||||
XCOMM To let untrusted clients use the color management database created
|
||||
XCOMM by xcmsdb, include these lines.
|
||||
property XDCCC_LINEAR_RGB_CORRECTION root ar
|
||||
property XDCCC_LINEAR_RGB_MATRICES root ar
|
||||
property XDCCC_GRAY_SCREENWHITEPOINT root ar
|
||||
property XDCCC_GRAY_CORRECTION root ar
|
||||
|
||||
XCOMM To let untrusted clients use the overlay visuals that many vendors
|
||||
XCOMM support, include this line.
|
||||
property SERVER_OVERLAY_VISUALS root ar
|
||||
|
||||
XCOMM Dumb examples to show other capabilities.
|
||||
|
||||
XCOMM oddball property names and explicit specification of error conditions
|
||||
property "property with spaces" 'property with "' aw er ed
|
||||
|
||||
XCOMM Allow deletion of Woo-Hoo if window also has property OhBoy with value
|
||||
XCOMM ending in "son". Reads and writes will cause an error.
|
||||
property Woo-Hoo OhBoy = "*son" ad
|
||||
|
||||
.fi
|
||||
.SH FILES
|
||||
.TP 30
|
||||
.I __projectroot__/lib/xserver/SecurityPolicy
|
||||
Default X server security policy
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fIXserver\fp(__appmansuffix__),
|
||||
.I "Security Extension Specification"
|
|
@ -414,221 +414,8 @@ X servers that support the SECURITY extension accept the following option:
|
|||
causes the server to attempt to read and interpret filename as a security
|
||||
policy file with the format described below. The file is read at server
|
||||
startup and reread at each server reset.
|
||||
.PP
|
||||
The syntax of the security policy file is as follows.
|
||||
Notation: "*" means zero or more occurrences of the preceding element,
|
||||
and "+" means one or more occurrences. To interpret <foo/bar>, ignore
|
||||
the text after the /; it is used to distinguish between instances of
|
||||
<foo> in the next section.
|
||||
.PP
|
||||
.nf
|
||||
<policy file> ::= <version line> <other line>*
|
||||
|
||||
<version line> ::= <string/v> '\en'
|
||||
|
||||
<other line > ::= <comment> | <access rule> | <site policy> | <blank line>
|
||||
|
||||
<comment> ::= # <not newline>* '\en'
|
||||
|
||||
<blank line> ::= <space> '\en'
|
||||
|
||||
<site policy> ::= sitepolicy <string/sp> '\en'
|
||||
|
||||
<access rule> ::= property <property/ar> <window> <perms> '\en'
|
||||
|
||||
<property> ::= <string>
|
||||
|
||||
<window> ::= any | root | <required property>
|
||||
|
||||
<required property> ::= <property/rp> | <property with value>
|
||||
|
||||
<property with value> ::= <property/rpv> = <string/rv>
|
||||
|
||||
<perms> ::= [ <operation> | <action> | <space> ]*
|
||||
|
||||
<operation> ::= r | w | d
|
||||
|
||||
<action> ::= a | i | e
|
||||
|
||||
<string> ::= <dbl quoted string> | <single quoted string> | <unquoted string>
|
||||
|
||||
<dbl quoted string> ::= <space> " <not dqoute>* " <space>
|
||||
|
||||
<single quoted string> ::= <space> ' <not squote>* ' <space>
|
||||
|
||||
<unquoted string> ::= <space> <not space>+ <space>
|
||||
|
||||
<space> ::= [ ' ' | '\et' ]*
|
||||
|
||||
Character sets:
|
||||
|
||||
<not newline> ::= any character except '\en'
|
||||
<not dqoute> ::= any character except "
|
||||
<not squote> ::= any character except '
|
||||
<not space> ::= any character except those in <space>
|
||||
.fi
|
||||
.PP
|
||||
The semantics associated with the above syntax are as follows.
|
||||
.PP
|
||||
<version line>, the first line in the file, specifies the file format
|
||||
version. If the server does not recognize the version <string/v>, it
|
||||
ignores the rest of the file. The version string for the file format
|
||||
described here is "version-1" .
|
||||
.PP
|
||||
Once past the <version line>, lines that do not match the above syntax
|
||||
are ignored.
|
||||
.PP
|
||||
<comment> lines are ignored.
|
||||
.PP
|
||||
<sitepolicy> lines are currently ignored. They are intended to
|
||||
specify the site policies used by the XC-QUERY-SECURITY-1
|
||||
authorization method.
|
||||
.PP
|
||||
<access rule> lines specify how the server should react to untrusted
|
||||
client requests that affect the X Window property named <property/ar>.
|
||||
The rest of this section describes the interpretation of an
|
||||
<access rule>.
|
||||
.PP
|
||||
For an <access rule> to apply to a given instance of <property/ar>,
|
||||
<property/ar> must be on a window that is in the set of windows
|
||||
specified by <window>. If <window> is any, the rule applies to
|
||||
<property/ar> on any window. If <window> is root, the rule applies to
|
||||
<property/ar> only on root windows.
|
||||
.PP
|
||||
If <window> is <required property>, the following apply. If <required
|
||||
property> is a <property/rp>, the rule applies when the window also
|
||||
has that <property/rp>, regardless of its value. If <required
|
||||
property> is a <property with value>, <property/rpv> must also have
|
||||
the value specified by <string/rv>. In this case, the property must
|
||||
have type STRING and format 8, and should contain one or more
|
||||
null-terminated strings. If any of the strings match <string/rv>, the
|
||||
rule applies.
|
||||
.PP
|
||||
The definition of string matching is simple case-sensitive string
|
||||
comparison with one elaboration: the occurrence of the character '*' in
|
||||
<string/rv> is a wildcard meaning "any string." A <string/rv> can
|
||||
contain multiple wildcards anywhere in the string. For example, "x*"
|
||||
matches strings that begin with x, "*x" matches strings that end with
|
||||
x, "*x*" matches strings containing x, and "x*y*" matches strings that
|
||||
start with x and subsequently contain y.
|
||||
.PP
|
||||
There may be multiple <access rule> lines for a given <property/ar>.
|
||||
The rules are tested in the order that they appear in the file. The
|
||||
first rule that applies is used.
|
||||
.PP
|
||||
<perms> specify operations that untrusted clients may attempt, and
|
||||
the actions that the server should take in response to those operations.
|
||||
.PP
|
||||
<operation> can be r (read), w (write), or d (delete). The following
|
||||
table shows how X Protocol property requests map to these operations
|
||||
in The Open Group server implementation.
|
||||
.PP
|
||||
.nf
|
||||
GetProperty r, or r and d if delete = True
|
||||
ChangeProperty w
|
||||
RotateProperties r and w
|
||||
DeleteProperty d
|
||||
ListProperties none, untrusted clients can always list all properties
|
||||
.fi
|
||||
.PP
|
||||
<action> can be a (allow), i (ignore), or e (error). Allow means
|
||||
execute the request as if it had been issued by a trusted client.
|
||||
Ignore means treat the request as a no-op. In the case of
|
||||
GetProperty, ignore means return an empty property value if the
|
||||
property exists, regardless of its actual value. Error means do not
|
||||
execute the request and return a BadAtom error with the atom set to
|
||||
the property name. Error is the default action for all properties,
|
||||
including those not listed in the security policy file.
|
||||
.PP
|
||||
An <action> applies to all <operation>s that follow it, until the next
|
||||
<action> is encountered. Thus, irwad means ignore read and write,
|
||||
allow delete.
|
||||
.PP
|
||||
GetProperty and RotateProperties may do multiple operations (r and d,
|
||||
or r and w). If different actions apply to the operations, the most
|
||||
severe action is applied to the whole request; there is no partial
|
||||
request execution. The severity ordering is: allow < ignore < error.
|
||||
Thus, if the <perms> for a property are ired (ignore read, error
|
||||
delete), and an untrusted client attempts GetProperty on that property
|
||||
with delete = True, an error is returned, but the property value is
|
||||
not. Similarly, if any of the properties in a RotateProperties do not
|
||||
allow both read and write, an error is returned without changing any
|
||||
property values.
|
||||
.PP
|
||||
Here is an example security policy file.
|
||||
.PP
|
||||
.ta 3i 4i
|
||||
.nf
|
||||
version-1
|
||||
|
||||
XCOMM Allow reading of application resources, but not writing.
|
||||
property RESOURCE_MANAGER root ar iw
|
||||
property SCREEN_RESOURCES root ar iw
|
||||
|
||||
XCOMM Ignore attempts to use cut buffers. Giving errors causes apps to crash,
|
||||
XCOMM and allowing access may give away too much information.
|
||||
property CUT_BUFFER0 root irw
|
||||
property CUT_BUFFER1 root irw
|
||||
property CUT_BUFFER2 root irw
|
||||
property CUT_BUFFER3 root irw
|
||||
property CUT_BUFFER4 root irw
|
||||
property CUT_BUFFER5 root irw
|
||||
property CUT_BUFFER6 root irw
|
||||
property CUT_BUFFER7 root irw
|
||||
|
||||
XCOMM If you are using Motif, you probably want these.
|
||||
property _MOTIF_DEFAULT_BINDINGS root ar iw
|
||||
property _MOTIF_DRAG_WINDOW root ar iw
|
||||
property _MOTIF_DRAG_TARGETS any ar iw
|
||||
property _MOTIF_DRAG_ATOMS any ar iw
|
||||
property _MOTIF_DRAG_ATOM_PAIRS any ar iw
|
||||
|
||||
XCOMM The next two rules let xwininfo -tree work when untrusted.
|
||||
property WM_NAME any ar
|
||||
|
||||
XCOMM Allow read of WM_CLASS, but only for windows with WM_NAME.
|
||||
XCOMM This might be more restrictive than necessary, but demonstrates
|
||||
XCOMM the <required property> facility, and is also an attempt to
|
||||
XCOMM say "top level windows only."
|
||||
property WM_CLASS WM_NAME ar
|
||||
|
||||
XCOMM These next three let xlsclients work untrusted. Think carefully
|
||||
XCOMM before including these; giving away the client machine name and command
|
||||
XCOMM may be exposing too much.
|
||||
property WM_STATE WM_NAME ar
|
||||
property WM_CLIENT_MACHINE WM_NAME ar
|
||||
property WM_COMMAND WM_NAME ar
|
||||
|
||||
XCOMM To let untrusted clients use the standard colormaps created by
|
||||
XCOMM xstdcmap, include these lines.
|
||||
property RGB_DEFAULT_MAP root ar
|
||||
property RGB_BEST_MAP root ar
|
||||
property RGB_RED_MAP root ar
|
||||
property RGB_GREEN_MAP root ar
|
||||
property RGB_BLUE_MAP root ar
|
||||
property RGB_GRAY_MAP root ar
|
||||
|
||||
XCOMM To let untrusted clients use the color management database created
|
||||
XCOMM by xcmsdb, include these lines.
|
||||
property XDCCC_LINEAR_RGB_CORRECTION root ar
|
||||
property XDCCC_LINEAR_RGB_MATRICES root ar
|
||||
property XDCCC_GRAY_SCREENWHITEPOINT root ar
|
||||
property XDCCC_GRAY_CORRECTION root ar
|
||||
|
||||
XCOMM To let untrusted clients use the overlay visuals that many vendors
|
||||
XCOMM support, include this line.
|
||||
property SERVER_OVERLAY_VISUALS root ar
|
||||
|
||||
XCOMM Dumb examples to show other capabilities.
|
||||
|
||||
XCOMM oddball property names and explicit specification of error conditions
|
||||
property "property with spaces" 'property with "' aw er ed
|
||||
|
||||
XCOMM Allow deletion of Woo-Hoo if window also has property OhBoy with value
|
||||
XCOMM ending in "son". Reads and writes will cause an error.
|
||||
property Woo-Hoo OhBoy = "*son" ad
|
||||
|
||||
.fi
|
||||
The syntax of the security policy file is described in
|
||||
\fISecurityPolicy\fP(__filemansuffix__).
|
||||
.SH "NETWORK CONNECTIONS"
|
||||
The X server supports client connections via a platform-dependent subset of
|
||||
the following transport types: TCP\/IP, Unix Domain sockets, DECnet,
|
||||
|
@ -757,6 +544,9 @@ Error log file for display number \fBn\fP if run from \fIinit\fP(__adminmansuffi
|
|||
.TP 30
|
||||
.I __projectroot__/lib/X11/xdm/xdm-errors
|
||||
Default error log file if the server is run from \fIxdm\fP(1)
|
||||
.TP 30
|
||||
.I __projectroot__/lib/xserver/SecurityPolicy
|
||||
Default X server security policy
|
||||
.SH "SEE ALSO"
|
||||
General information: \fIX\fP(__miscmansuffix__)
|
||||
.PP
|
||||
|
@ -771,6 +561,7 @@ Fonts: \fIbdftopcf\fP(1), \fImkfontdir\fP(1), \fImkfontscale\fP(1),
|
|||
.PP
|
||||
Security: \fIXsecurity\fP(__miscmansuffix__), \fIxauth\fP(1), \fIXau\fP(1),
|
||||
\fIxdm\fP(1), \fIxhost\fP(1), \fIxfwp\fP(1),
|
||||
\fISecurityPolicy\fP(__filemansuffix__),
|
||||
.I "Security Extension Specification"
|
||||
.PP
|
||||
Starting the server: \fIxdm\fP(1), \fIxinit\fP(1)
|
||||
|
|
|
@ -668,10 +668,6 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef COMPOSITE
|
||||
miDisableCompositeWrapper(pScreen);
|
||||
#endif
|
||||
|
||||
#ifdef MITSHM
|
||||
/* Re-register with the MI funcs, which don't allow shared pixmaps.
|
||||
* Shared pixmaps are almost always a performance loss for us, but this
|
||||
|
|
|
@ -43,11 +43,7 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp)
|
|||
if (paddedWidth / 4 > 32767 || height > 32767)
|
||||
return NullPixmap;
|
||||
datasize = height * paddedWidth;
|
||||
#ifdef PIXPRIV
|
||||
base = pScreen->totalPixmapSize;
|
||||
#else
|
||||
base = sizeof (PixmapRec);
|
||||
#endif
|
||||
adjust = 0;
|
||||
if (base & 7)
|
||||
adjust = 8 - (base & 7);
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
if DMX
|
||||
if BUILD_DARWIN
|
||||
# Darwin does not need the dmx subdir
|
||||
else
|
||||
DMX_SUBDIRS = dmx
|
||||
endif
|
||||
endif
|
||||
|
||||
if XORG
|
||||
if BUILD_DARWIN
|
||||
# Darwin does not need the xfree86 subdir
|
||||
else
|
||||
XORG_SUBDIRS = xfree86
|
||||
endif
|
||||
endif
|
||||
|
||||
if XVFB
|
||||
XVFB_SUBDIRS = vfb
|
||||
|
@ -30,12 +38,15 @@ if XPRINT
|
|||
XPRINT_SUBDIRS = xprint
|
||||
endif
|
||||
|
||||
# need to add darwin support here
|
||||
if BUILD_DARWIN
|
||||
DARWIN_SUBDIRS = darwin
|
||||
endif
|
||||
|
||||
SUBDIRS = \
|
||||
$(XORG_SUBDIRS) \
|
||||
$(XGL_SUBDIRS) \
|
||||
$(XWIN_SUBDIRS) \
|
||||
$(DARWIN_SUBDIRS) \
|
||||
$(XVFB_SUBDIRS) \
|
||||
$(XNEST_SUBDIRS) \
|
||||
$(DMX_SUBDIRS) \
|
||||
|
|
|
@ -1,52 +1,283 @@
|
|||
noinst_LIBRARIES = libdarwinShared.a
|
||||
libdarwin_XINPUT_SRCS = darwinXinput.c
|
||||
|
||||
AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
|
||||
AM_CPPFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
|
||||
INCLUDES = @XORG_INCS@ -I../../miext/rootless
|
||||
|
||||
DEFS = @DEFS@ -DUSE_NEW_CLUT
|
||||
|
||||
if XQUARTZ
|
||||
XQUARTZ_SUBDIRS = bundle quartz
|
||||
endif
|
||||
|
||||
SUBDIRS = \
|
||||
iokit \
|
||||
$(XQUARTZ_SUBDIRS) \
|
||||
utils \
|
||||
.
|
||||
|
||||
darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app
|
||||
|
||||
libdarwinShared_a_SOURCES = darwin.c \
|
||||
darwinEvents.c \
|
||||
darwinKeyboard.c \
|
||||
$(darwin_XINPUT_SRCS)
|
||||
|
||||
bin_PROGRAMS = XDarwin Xquartz
|
||||
XDarwin_SOURCES = \
|
||||
$(top_srcdir)/fb/fbcmap.c \
|
||||
$(top_srcdir)/mi/miinitext.c \
|
||||
$(top_srcdir)/Xi/stubs.c
|
||||
|
||||
Xquartz_SOURCES = \
|
||||
$(top_srcdir)/fb/fbcmap.c \
|
||||
$(top_srcdir)/mi/miinitext.c \
|
||||
$(top_srcdir)/Xi/stubs.c \
|
||||
apple/X11Application.m \
|
||||
apple/X11Controller.m \
|
||||
quartz/Xserver.m \
|
||||
quartz/Preferences.m \
|
||||
quartz/applewm.c \
|
||||
quartz/keysym2ucs.c \
|
||||
quartz/pseudoramiX.c \
|
||||
quartz/quartz.c \
|
||||
quartz/quartzAudio.c \
|
||||
quartz/quartzCocoa.m \
|
||||
quartz/quartzKeyboard.c \
|
||||
quartz/quartzPasteboard.c \
|
||||
quartz/quartzStartup.c \
|
||||
quartz/xpr/appledri.c \
|
||||
quartz/xpr/dri.c \
|
||||
quartz/xpr/xprAppleWM.c \
|
||||
quartz/xpr/xprCursor.c \
|
||||
quartz/xpr/xprFrame.c \
|
||||
quartz/xpr/xprScreen.c \
|
||||
quartz/xpr/x-hash.c \
|
||||
quartz/xpr/x-hook.c \
|
||||
quartz/xpr/x-list.c
|
||||
|
||||
XDarwin_LDADD = \
|
||||
$(top_builddir)/dix/dixfonts.lo \
|
||||
$(top_builddir)/dix/libdix.la \
|
||||
$(top_builddir)/config/libconfig.a \
|
||||
./libdarwinShared.a \
|
||||
./iokit/libiokit.a \
|
||||
$(top_builddir)/miext/shadow/libshadow.la \
|
||||
$(top_builddir)/miext/cw/libcw.la \
|
||||
$(DARWIN_LIBS) \
|
||||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||
@XORG_LIBS@ \
|
||||
$(XSERVER_LIBS)
|
||||
|
||||
Xquartz_LDADD = \
|
||||
$(top_builddir)/dix/dixfonts.lo \
|
||||
$(top_builddir)/dix/libdix.la \
|
||||
$(top_builddir)/config/libconfig.a \
|
||||
./libdarwinShared.a \
|
||||
$(top_builddir)/miext/shadow/libshadow.la \
|
||||
$(top_builddir)/miext/cw/libcw.la \
|
||||
$(DARWIN_LIBS) \
|
||||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||
@XORG_LIBS@ \
|
||||
$(XSERVER_LIBS) -lXplugin
|
||||
|
||||
XDarwin_LDFLAGS = \
|
||||
-XCClinker -Objc \
|
||||
-Wl,-u,_miDCInitialize \
|
||||
-Wl,-framework,IOKit
|
||||
|
||||
Xquartz_LDFLAGS = \
|
||||
-XCClinker -Objc \
|
||||
-Wl,-u,_miDCInitialize \
|
||||
-Wl,-framework,Carbon \
|
||||
-Wl,-framework,OpenGL \
|
||||
-Wl,-framework,Cocoa \
|
||||
-Wl,-framework,CoreAudio \
|
||||
-Wl,-framework,IOKit
|
||||
|
||||
XDarwin_CFLAGS = -DINXDARWIN
|
||||
Xquartz_CFLAGS = -DINXQUARTZ -DHAS_CG_MACH_PORT -DHAS_KL_API -DHAVE_XORG_CONFIG_H
|
||||
|
||||
if XQUARTZ
|
||||
macosdir = $(darwinappdir)/Contents/MacOS
|
||||
|
||||
DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server
|
||||
|
||||
macos_PROGRAMS = XDarwinApp
|
||||
macos_SCRIPTS = x11app
|
||||
|
||||
x11app:
|
||||
cd apple && xcodebuild CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)"
|
||||
|
||||
XDarwinApp_SOURCES = \
|
||||
$(top_srcdir)/fb/fbcmap.c \
|
||||
$(top_srcdir)/mi/miinitext.c \
|
||||
$(top_srcdir)/Xi/stubs.c
|
||||
|
||||
XDarwinApp_LDADD = \
|
||||
$(top_builddir)/dix/dixfonts.lo \
|
||||
$(top_builddir)/dix/libdix.la \
|
||||
$(top_builddir)/config/libconfig.a \
|
||||
$(top_builddir)/os/libos.la \
|
||||
./quartz/XApplication.o \
|
||||
./libdarwinShared.a \
|
||||
./quartz/libXQuartz.a \
|
||||
$(top_builddir)/miext/shadow/libshadow.la \
|
||||
$(top_builddir)/miext/cw/libcw.la \
|
||||
$(DARWIN_LIBS) \
|
||||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||
@XORG_LIBS@ \
|
||||
$(XSERVER_LIBS)
|
||||
|
||||
XDarwinApp_LDFLAGS = \
|
||||
-XCClinker -Objc \
|
||||
-Wl,-u,_miDCInitialize \
|
||||
-Wl,-framework,Carbon \
|
||||
-Wl,-framework,ApplicationServices \
|
||||
-Wl,-framework,Cocoa \
|
||||
-Wl,-framework,CoreAudio \
|
||||
-Wl,-framework,IOKit
|
||||
|
||||
XDarwinApp_CFLAGS = -DINXDARWINAPP
|
||||
HOOK_TARGETS = xquartz-install-hook
|
||||
|
||||
|
||||
crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS
|
||||
crplugin_LTLIBRARIES = cr.la
|
||||
cr_la_SOURCES = \
|
||||
quartz/cr/crAppleWM.m \
|
||||
quartz/cr/crFrame.m \
|
||||
quartz/cr/crScreen.m \
|
||||
quartz/fullscreen/quartzCursor.c \
|
||||
quartz/cr/XView.m
|
||||
|
||||
cr_la_LIBADD = \
|
||||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la
|
||||
|
||||
cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
|
||||
-Wl,-framework,Cocoa \
|
||||
-Wl,-framework,Carbon \
|
||||
-XCClinker -ObjC \
|
||||
-XCClinker -bundle_loader -XCClinker XDarwinApp \
|
||||
-module -avoid-version -no-undefined
|
||||
cr_la_DEPENDENCIES = XDarwinApp
|
||||
|
||||
fullscreenplugindir = $(darwinappdir)/Contents/Resources/fullscreen.bundle/Contents/MacOS
|
||||
fullscreenplugin_LTLIBRARIES = fullscreen.la
|
||||
fullscreen_la_SOURCES = \
|
||||
quartz/fullscreen/fullscreen.c \
|
||||
quartz/fullscreen/quartzCursor.c
|
||||
|
||||
fullscreen_la_LIBADD = \
|
||||
$(top_builddir)/miext/shadow/libshadow.la
|
||||
|
||||
fullscreen_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
|
||||
-XCClinker -bundle_loader -XCClinker XDarwinApp \
|
||||
-module -avoid-version -no-undefined
|
||||
fullscreen_la_DEPENDENCIES = XDarwinApp
|
||||
|
||||
if GLX
|
||||
glxMesaplugindir = $(darwinappdir)/Contents/Resources/glxMesa.bundle/Contents/MacOS
|
||||
glxMesaplugin_LTLIBRARIES = glxMesa.la
|
||||
glxMesa_la_SOURCES =
|
||||
glxMesa_la_LIBADD = \
|
||||
$(top_builddir)/GL/glx/libglx.la \
|
||||
$(top_builddir)/GL/mesa/libGLcore.la
|
||||
glxMesa_la_LDFLAGS = -shrext '' \
|
||||
-Wl,-framework,AGL \
|
||||
-Wl,-framework,OpenGL \
|
||||
-XCClinker -ObjC \
|
||||
-XCClinker -bundle_loader -XCClinker XDarwinApp \
|
||||
-module -avoid-version -no-undefined
|
||||
glxMesa_la_DEPENDENCIES = XDarwinApp
|
||||
endif
|
||||
|
||||
endif
|
||||
if HAVE_X_PLUGIN
|
||||
|
||||
xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS
|
||||
xprplugin_LTLIBRARIES = xpr.la
|
||||
xpr_la_SOURCES = \
|
||||
quartz/xpr/appledri.c \
|
||||
quartz/xpr/dri.c \
|
||||
quartz/xpr/xprAppleWM.c \
|
||||
quartz/xpr/xprCursor.c \
|
||||
quartz/xpr/xprFrame.c \
|
||||
quartz/xpr/xprScreen.c \
|
||||
quartz/xpr/x-hash.c \
|
||||
quartz/xpr/x-hook.c \
|
||||
quartz/xpr/x-list.c
|
||||
|
||||
xpr_la_LIBADD = \
|
||||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la
|
||||
|
||||
xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
|
||||
-lXplugin \
|
||||
-XCClinker -bundle_loader -XCClinker XDarwinApp \
|
||||
-module -avoid-version -no-undefined
|
||||
xpr_la_DEPENDENCIES = XDarwinApp
|
||||
|
||||
endif
|
||||
|
||||
if HAVE_AGL_FRAMEWORK
|
||||
glxCGLplugindir = $(darwinappdir)/Contents/Resources/glxCGL.bundle/Contents/MacOS
|
||||
glxCGLplugin_LTLIBRARIES = glxCGL.la
|
||||
glxCGL_la_SOURCES =
|
||||
glxCGL_la_LIBADD = \
|
||||
$(top_builddir)/GL/glx/glxext.o \
|
||||
$(top_builddir)/GL/glx/libglx.a \
|
||||
$(top_builddir)/GL/apple/libAGLcore.a
|
||||
glxCGL_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
|
||||
-Wl,-framework,AGL \
|
||||
-Wl,-framework,OpenGL \
|
||||
-XCClinker -ObjC \
|
||||
-XCClinker -bundle_loader -XCClinker XDarwinApp \
|
||||
-module -avoid-version -no-undefined
|
||||
glxCGL_la_DEPENDENCIES = XDarwinApp
|
||||
|
||||
|
||||
glxAGLplugindir = $(darwinappdir)/Contents/Resources/glxAGL.bundle/Contents/MacOS
|
||||
glxAGLplugin_LTLIBRARIES = glxAGL.la
|
||||
glxAGL_la_SOURCES =
|
||||
glxAGL_la_LIBADD = \
|
||||
$(top_builddir)/GL/glx/glxext.o \
|
||||
$(top_builddir)/GL/glx/libglx.a \
|
||||
$(top_builddir)/GL/apple/libAGLcore.a
|
||||
glxAGL_la_LDFLAGS = -shrext '' \
|
||||
-Wl,-framework,AGL \
|
||||
-Wl,-framework,OpenGL \
|
||||
-XCClinker -ObjC \
|
||||
-XCClinker -bundle_loader -XCClinker XDarwinApp \
|
||||
-module -avoid-version -no-undefined
|
||||
glxAGL_la_DEPENDENCIES = XDarwinApp
|
||||
|
||||
|
||||
|
||||
endif
|
||||
|
||||
man1_MANS = XDarwin.man
|
||||
|
||||
uninstall-hook:
|
||||
rm -rf $(DESTDIR)$(macosdir)/XDarwin
|
||||
|
||||
install-data-hook: $(HOOK_TARGETS)
|
||||
|
||||
xquartz-install-hook:
|
||||
mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin
|
||||
cd apple && xcodebuild install
|
||||
|
||||
EXTRA_DIST = \
|
||||
bundle/Dutch.lproj/Credits.rtf \
|
||||
bundle/Dutch.lproj/Localizable.strings \
|
||||
bundle/Dutch.lproj/MainMenu.nib/classes.nib \
|
||||
bundle/Dutch.lproj/MainMenu.nib/objects.nib \
|
||||
bundle/Dutch.lproj/XDarwinHelp.html.cpp \
|
||||
bundle/English.lproj/Credits.rtf \
|
||||
bundle/English.lproj/InfoPlist.strings.cpp \
|
||||
bundle/English.lproj/Localizable.strings \
|
||||
bundle/English.lproj/MainMenu.nib/classes.nib \
|
||||
bundle/English.lproj/MainMenu.nib/objects.nib \
|
||||
bundle/English.lproj/XDarwinHelp.html.cpp \
|
||||
bundle/French.lproj/Credits.rtf \
|
||||
bundle/French.lproj/Localizable.strings \
|
||||
bundle/French.lproj/MainMenu.nib/classes.nib \
|
||||
bundle/French.lproj/MainMenu.nib/objects.nib \
|
||||
bundle/French.lproj/XDarwinHelp.html.cpp \
|
||||
bundle/German.lproj/Credits.rtf \
|
||||
bundle/German.lproj/Localizable.strings \
|
||||
bundle/German.lproj/MainMenu.nib/classes.nib \
|
||||
bundle/German.lproj/MainMenu.nib/objects.nib \
|
||||
bundle/German.lproj/XDarwinHelp.html.cpp \
|
||||
bundle/Japanese.lproj/Credits.rtf \
|
||||
bundle/Japanese.lproj/Localizable.strings \
|
||||
bundle/Japanese.lproj/MainMenu.nib/classes.nib \
|
||||
bundle/Japanese.lproj/MainMenu.nib/objects.nib \
|
||||
bundle/Japanese.lproj/XDarwinHelp.html.cpp \
|
||||
bundle/ko.lproj/Credits.rtf \
|
||||
bundle/ko.lproj/Localizable.strings \
|
||||
bundle/ko.lproj/MainMenu.nib/classes.nib \
|
||||
bundle/ko.lproj/MainMenu.nib/objects.nib \
|
||||
bundle/ko.lproj/XDarwinHelp.html.cpp \
|
||||
bundle/Portuguese.lproj/Credits.rtf \
|
||||
bundle/Portuguese.lproj/Localizable.strings \
|
||||
bundle/Portuguese.lproj/MainMenu.nib/classes.nib \
|
||||
bundle/Portuguese.lproj/MainMenu.nib/objects.nib \
|
||||
bundle/Portuguese.lproj/XDarwinHelp.html.cpp \
|
||||
bundle/Spanish.lproj/Credits.rtf \
|
||||
bundle/Spanish.lproj/Localizable.strings \
|
||||
bundle/Spanish.lproj/MainMenu.nib/classes.nib \
|
||||
bundle/Spanish.lproj/MainMenu.nib/objects.nib \
|
||||
bundle/Spanish.lproj/XDarwinHelp.html.cpp \
|
||||
bundle/startXClients.cpp \
|
||||
bundle/Swedish.lproj/Credits.rtf \
|
||||
bundle/Swedish.lproj/Localizable.strings \
|
||||
bundle/Swedish.lproj/MainMenu.nib/classes.nib \
|
||||
bundle/Swedish.lproj/MainMenu.nib/objects.nib \
|
||||
bundle/Swedish.lproj/XDarwinHelp.html.cpp \
|
||||
bundle/XDarwin.icns \
|
||||
darwin.c \
|
||||
darwinClut8.h \
|
||||
darwinEvents.c \
|
||||
|
@ -54,64 +285,4 @@ EXTRA_DIST = \
|
|||
darwinKeyboard.c \
|
||||
darwinKeyboard.h \
|
||||
darwinXinput.c \
|
||||
iokit/xfIOKit.c \
|
||||
iokit/xfIOKitCursor.c \
|
||||
iokit/xfIOKit.h \
|
||||
iokit/xfIOKitStartup.c \
|
||||
Makefile.am \
|
||||
quartz/applewm.c \
|
||||
quartz/applewmExt.h \
|
||||
quartz/cr/crAppleWM.m \
|
||||
quartz/cr/crFrame.m \
|
||||
quartz/cr/cr.h \
|
||||
quartz/cr/crScreen.m \
|
||||
quartz/cr/XView.h \
|
||||
quartz/cr/XView.m \
|
||||
quartz/fullscreen/fullscreen.c \
|
||||
quartz/fullscreen/quartzCursor.c \
|
||||
quartz/fullscreen/quartzCursor.h \
|
||||
quartz/keysym2ucs.c \
|
||||
quartz/keysym2ucs.h \
|
||||
quartz/Preferences.h \
|
||||
quartz/Preferences.m \
|
||||
quartz/pseudoramiX.c \
|
||||
quartz/pseudoramiX.h \
|
||||
quartz/quartzAudio.c \
|
||||
quartz/quartzAudio.h \
|
||||
quartz/quartz.c \
|
||||
quartz/quartzCocoa.m \
|
||||
quartz/quartzCommon.h \
|
||||
quartz/quartzCursor.c \
|
||||
quartz/quartzCursor.h \
|
||||
quartz/quartz.h \
|
||||
quartz/quartzKeyboard.c \
|
||||
quartz/quartzPasteboard.c \
|
||||
quartz/quartzPasteboard.h \
|
||||
quartz/quartzStartup.c \
|
||||
quartz/XApplication.h \
|
||||
quartz/XApplication.m \
|
||||
quartz/XDarwin.pbproj/project.pbxproj \
|
||||
quartz/XDarwinStartup.c \
|
||||
quartz/XDarwinStartup.man \
|
||||
quartz/xpr/appledri.c \
|
||||
quartz/xpr/dri.c \
|
||||
quartz/xpr/dri.h \
|
||||
quartz/xpr/dristruct.h \
|
||||
quartz/xpr/x-hash.c \
|
||||
quartz/xpr/x-hash.h \
|
||||
quartz/xpr/x-hook.c \
|
||||
quartz/xpr/x-hook.h \
|
||||
quartz/xpr/x-list.c \
|
||||
quartz/xpr/x-list.h \
|
||||
quartz/xpr/Xplugin.h \
|
||||
quartz/xpr/xprAppleWM.c \
|
||||
quartz/xpr/xprCursor.c \
|
||||
quartz/xpr/xprFrame.c \
|
||||
quartz/xpr/xpr.h \
|
||||
quartz/xpr/xprScreen.c \
|
||||
quartz/XServer.h \
|
||||
quartz/XServer.m \
|
||||
utils/dumpkeymap.c \
|
||||
utils/dumpkeymap.man \
|
||||
utils/README.txt \
|
||||
XDarwin.man
|
||||
|
|
35
hw/darwin/README.apple
Normal file
35
hw/darwin/README.apple
Normal file
|
@ -0,0 +1,35 @@
|
|||
This directory contains a port of the XDarwin code to the modular X.org
|
||||
codebase to be compiled on Darwin/OS X; this would not have been possible
|
||||
without the help of Torrey Lyons and Peter O'Gorman, to whom I am
|
||||
grateful for their patches, time and moral support.
|
||||
|
||||
The server builds 4 targets:
|
||||
|
||||
* XDarwin: this server runs on Darwin systems without Quartz
|
||||
(i.e. non-OS X); it has not been well-tested.
|
||||
|
||||
* XDarwinApp: this builds XDarwin.app, which is a full X server using
|
||||
Quartz. It has loadable module support for AGL and CGL, and well as
|
||||
fullscreen and rootless support.
|
||||
|
||||
* Xquartz: this server runs on Quartz-based systems, and is meant to
|
||||
work with X11.app
|
||||
|
||||
* x11app: this builds a version of Apple's X11.app using patches by
|
||||
Torrey Lyons; most, but not all, functionality of Apple's original
|
||||
X11.app is present in this release.
|
||||
|
||||
Known issues:
|
||||
|
||||
* AGL and CGL support for 3D indirect acceleration does not work;
|
||||
indirect.c has been rewritten, but not yet integrated into this source tree.
|
||||
|
||||
* Fullscreen mode does not work; I don't know why.
|
||||
|
||||
* Some features in X11.app are not yet implemented; these are marked
|
||||
with #ifdef DARWIN_DDX_MISSING in the code.
|
||||
|
||||
* The build system code could probably be cleaned up slightly.
|
||||
|
||||
Any patches or code contributions would be most welcome and may be
|
||||
sent to me at bbyer@apple.com.
|
BIN
hw/darwin/apple/English.lproj/InfoPlist.strings
Normal file
BIN
hw/darwin/apple/English.lproj/InfoPlist.strings
Normal file
Binary file not shown.
65
hw/darwin/apple/English.lproj/main.nib/.svn/entries
Normal file
65
hw/darwin/apple/English.lproj/main.nib/.svn/entries
Normal file
|
@ -0,0 +1,65 @@
|
|||
8
|
||||
|
||||
dir
|
||||
29110
|
||||
svn+ssh://src.apple.com/svn/BSD/X11server/trunk/darwin/apple/English.lproj/main.nib
|
||||
svn+ssh://src.apple.com/svn/BSD
|
||||
|
||||
|
||||
|
||||
2007-02-03T03:06:20.842932Z
|
||||
28761
|
||||
bbyer
|
||||
|
||||
|
||||
svn:special svn:externals svn:needs-lock
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
e92bca22-270c-0410-9cea-e3f1106b6a1c
|
||||
|
||||
info.nib
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2007-02-27T01:00:07.000000Z
|
||||
456347804c516786b1d1339ce2ef50a2
|
||||
2007-02-03T03:06:20.842932Z
|
||||
28761
|
||||
bbyer
|
||||
|
||||
keyedobjects.nib
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2007-02-27T01:00:07.000000Z
|
||||
eb3010372b09768c846df0d996cfdd8d
|
||||
2007-02-03T03:06:20.842932Z
|
||||
28761
|
||||
bbyer
|
||||
has-props
|
||||
|
||||
classes.nib
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2007-02-27T01:00:07.000000Z
|
||||
0ae2660c3afabbd5aa02fc34712c96e6
|
||||
2007-02-03T03:06:20.842932Z
|
||||
28761
|
||||
bbyer
|
||||
|
1
hw/darwin/apple/English.lproj/main.nib/.svn/format
Normal file
1
hw/darwin/apple/English.lproj/main.nib/.svn/format
Normal file
|
@ -0,0 +1 @@
|
|||
8
|
|
@ -0,0 +1,5 @@
|
|||
K 13
|
||||
svn:mime-type
|
||||
V 24
|
||||
application/octet-stream
|
||||
END
|
|
@ -0,0 +1,318 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBClasses</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>IBLibraryObjectTemplate</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>draggedView</key>
|
||||
<string>NSView</string>
|
||||
<key>representedObject</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSView</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>IBInspector</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>inspectorView</key>
|
||||
<string>NSView</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSDateFormatter</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSFormatter</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>apps_table_cancel</key>
|
||||
<string>id</string>
|
||||
<key>apps_table_delete</key>
|
||||
<string>id</string>
|
||||
<key>apps_table_done</key>
|
||||
<string>id</string>
|
||||
<key>apps_table_duplicate</key>
|
||||
<string>id</string>
|
||||
<key>apps_table_new</key>
|
||||
<string>id</string>
|
||||
<key>apps_table_show</key>
|
||||
<string>id</string>
|
||||
<key>bring_to_front</key>
|
||||
<string>id</string>
|
||||
<key>close_window</key>
|
||||
<string>id</string>
|
||||
<key>enable_fullscreen_changed</key>
|
||||
<string>id</string>
|
||||
<key>minimize_window</key>
|
||||
<string>id</string>
|
||||
<key>next_window</key>
|
||||
<string>id</string>
|
||||
<key>prefs_changed</key>
|
||||
<string>id</string>
|
||||
<key>prefs_show</key>
|
||||
<string>id</string>
|
||||
<key>previous_window</key>
|
||||
<string>id</string>
|
||||
<key>toggle_fullscreen</key>
|
||||
<string>id</string>
|
||||
<key>x11_help</key>
|
||||
<string>id</string>
|
||||
<key>zoom_window</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>X11Controller</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>apps_separator</key>
|
||||
<string>id</string>
|
||||
<key>apps_table</key>
|
||||
<string>id</string>
|
||||
<key>depth</key>
|
||||
<string>id</string>
|
||||
<key>dock_apps_menu</key>
|
||||
<string>id</string>
|
||||
<key>dock_menu</key>
|
||||
<string>id</string>
|
||||
<key>dock_window_separator</key>
|
||||
<string>id</string>
|
||||
<key>enable_auth</key>
|
||||
<string>id</string>
|
||||
<key>enable_fullscreen</key>
|
||||
<string>id</string>
|
||||
<key>enable_keyequivs</key>
|
||||
<string>id</string>
|
||||
<key>enable_tcp</key>
|
||||
<string>id</string>
|
||||
<key>fake_buttons</key>
|
||||
<string>id</string>
|
||||
<key>prefs_panel</key>
|
||||
<string>id</string>
|
||||
<key>sync_keymap</key>
|
||||
<string>id</string>
|
||||
<key>toggle_fullscreen_item</key>
|
||||
<string>id</string>
|
||||
<key>use_sysbeep</key>
|
||||
<string>id</string>
|
||||
<key>window_separator</key>
|
||||
<string>id</string>
|
||||
<key>x11_about_item</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSNumberFormatter</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSFormatter</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSFormatter</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>alignCenter:</key>
|
||||
<string>id</string>
|
||||
<key>alignJustified:</key>
|
||||
<string>id</string>
|
||||
<key>alignLeft:</key>
|
||||
<string>id</string>
|
||||
<key>alignRight:</key>
|
||||
<string>id</string>
|
||||
<key>arrangeInFront:</key>
|
||||
<string>id</string>
|
||||
<key>centerSelectionInVisibleArea:</key>
|
||||
<string>id</string>
|
||||
<key>changeFont:</key>
|
||||
<string>id</string>
|
||||
<key>checkSpelling:</key>
|
||||
<string>id</string>
|
||||
<key>clear:</key>
|
||||
<string>id</string>
|
||||
<key>clearRecentDocuments:</key>
|
||||
<string>id</string>
|
||||
<key>complete:</key>
|
||||
<string>id</string>
|
||||
<key>copy:</key>
|
||||
<string>id</string>
|
||||
<key>copyFont:</key>
|
||||
<string>id</string>
|
||||
<key>copyRuler:</key>
|
||||
<string>id</string>
|
||||
<key>cut:</key>
|
||||
<string>id</string>
|
||||
<key>delete:</key>
|
||||
<string>id</string>
|
||||
<key>deminiaturize:</key>
|
||||
<string>id</string>
|
||||
<key>fax:</key>
|
||||
<string>id</string>
|
||||
<key>hide:</key>
|
||||
<string>id</string>
|
||||
<key>hideOtherApplications:</key>
|
||||
<string>id</string>
|
||||
<key>loosenKerning:</key>
|
||||
<string>id</string>
|
||||
<key>lowerBaseline:</key>
|
||||
<string>id</string>
|
||||
<key>makeKeyAndOrderFront:</key>
|
||||
<string>id</string>
|
||||
<key>miniaturize:</key>
|
||||
<string>id</string>
|
||||
<key>newDocument:</key>
|
||||
<string>id</string>
|
||||
<key>openDocument:</key>
|
||||
<string>id</string>
|
||||
<key>orderBack:</key>
|
||||
<string>id</string>
|
||||
<key>orderFront:</key>
|
||||
<string>id</string>
|
||||
<key>orderFrontColorPanel:</key>
|
||||
<string>id</string>
|
||||
<key>orderFrontHelpPanel:</key>
|
||||
<string>id</string>
|
||||
<key>orderOut:</key>
|
||||
<string>id</string>
|
||||
<key>outline:</key>
|
||||
<string>id</string>
|
||||
<key>paste:</key>
|
||||
<string>id</string>
|
||||
<key>pasteAsPlainText:</key>
|
||||
<string>id</string>
|
||||
<key>pasteAsRichText:</key>
|
||||
<string>id</string>
|
||||
<key>pasteFont:</key>
|
||||
<string>id</string>
|
||||
<key>pasteRuler:</key>
|
||||
<string>id</string>
|
||||
<key>pause:</key>
|
||||
<string>id</string>
|
||||
<key>performClose:</key>
|
||||
<string>id</string>
|
||||
<key>performFindPanelAction:</key>
|
||||
<string>id</string>
|
||||
<key>performMiniaturize:</key>
|
||||
<string>id</string>
|
||||
<key>performZoom:</key>
|
||||
<string>id</string>
|
||||
<key>play:</key>
|
||||
<string>id</string>
|
||||
<key>print:</key>
|
||||
<string>id</string>
|
||||
<key>printDocument:</key>
|
||||
<string>id</string>
|
||||
<key>raiseBaseline:</key>
|
||||
<string>id</string>
|
||||
<key>record:</key>
|
||||
<string>id</string>
|
||||
<key>redo:</key>
|
||||
<string>id</string>
|
||||
<key>resume:</key>
|
||||
<string>id</string>
|
||||
<key>revertDocumentToSaved:</key>
|
||||
<string>id</string>
|
||||
<key>run:</key>
|
||||
<string>id</string>
|
||||
<key>runPageLayout:</key>
|
||||
<string>id</string>
|
||||
<key>runToolbarCustomizationPalette:</key>
|
||||
<string>id</string>
|
||||
<key>saveAllDocuments:</key>
|
||||
<string>id</string>
|
||||
<key>saveDocument:</key>
|
||||
<string>id</string>
|
||||
<key>saveDocumentAs:</key>
|
||||
<string>id</string>
|
||||
<key>saveDocumentTo:</key>
|
||||
<string>id</string>
|
||||
<key>selectAll:</key>
|
||||
<string>id</string>
|
||||
<key>selectText:</key>
|
||||
<string>id</string>
|
||||
<key>showGuessPanel:</key>
|
||||
<string>id</string>
|
||||
<key>showHelp:</key>
|
||||
<string>id</string>
|
||||
<key>start:</key>
|
||||
<string>id</string>
|
||||
<key>startSpeaking:</key>
|
||||
<string>id</string>
|
||||
<key>stop:</key>
|
||||
<string>id</string>
|
||||
<key>stopSpeaking:</key>
|
||||
<string>id</string>
|
||||
<key>subscript:</key>
|
||||
<string>id</string>
|
||||
<key>superscript:</key>
|
||||
<string>id</string>
|
||||
<key>terminate:</key>
|
||||
<string>id</string>
|
||||
<key>tightenKerning:</key>
|
||||
<string>id</string>
|
||||
<key>toggleContinuousSpellChecking:</key>
|
||||
<string>id</string>
|
||||
<key>toggleRuler:</key>
|
||||
<string>id</string>
|
||||
<key>toggleToolbarShown:</key>
|
||||
<string>id</string>
|
||||
<key>turnOffKerning:</key>
|
||||
<string>id</string>
|
||||
<key>turnOffLigatures:</key>
|
||||
<string>id</string>
|
||||
<key>underline:</key>
|
||||
<string>id</string>
|
||||
<key>undo:</key>
|
||||
<string>id</string>
|
||||
<key>unhideAllApplications:</key>
|
||||
<string>id</string>
|
||||
<key>unscript:</key>
|
||||
<string>id</string>
|
||||
<key>useAllLigatures:</key>
|
||||
<string>id</string>
|
||||
<key>useStandardKerning:</key>
|
||||
<string>id</string>
|
||||
<key>useStandardLigatures:</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>FirstResponder</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>IBVersion</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>588</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>244</integer>
|
||||
<integer>29</integer>
|
||||
<integer>423</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9A356</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCocoaFramework</string>
|
||||
</dict>
|
||||
</plist>
|
Binary file not shown.
318
hw/darwin/apple/English.lproj/main.nib/classes.nib
generated
Normal file
318
hw/darwin/apple/English.lproj/main.nib/classes.nib
generated
Normal file
|
@ -0,0 +1,318 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBClasses</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>IBLibraryObjectTemplate</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>draggedView</key>
|
||||
<string>NSView</string>
|
||||
<key>representedObject</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSView</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>IBInspector</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>inspectorView</key>
|
||||
<string>NSView</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSDateFormatter</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSFormatter</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>apps_table_cancel</key>
|
||||
<string>id</string>
|
||||
<key>apps_table_delete</key>
|
||||
<string>id</string>
|
||||
<key>apps_table_done</key>
|
||||
<string>id</string>
|
||||
<key>apps_table_duplicate</key>
|
||||
<string>id</string>
|
||||
<key>apps_table_new</key>
|
||||
<string>id</string>
|
||||
<key>apps_table_show</key>
|
||||
<string>id</string>
|
||||
<key>bring_to_front</key>
|
||||
<string>id</string>
|
||||
<key>close_window</key>
|
||||
<string>id</string>
|
||||
<key>enable_fullscreen_changed</key>
|
||||
<string>id</string>
|
||||
<key>minimize_window</key>
|
||||
<string>id</string>
|
||||
<key>next_window</key>
|
||||
<string>id</string>
|
||||
<key>prefs_changed</key>
|
||||
<string>id</string>
|
||||
<key>prefs_show</key>
|
||||
<string>id</string>
|
||||
<key>previous_window</key>
|
||||
<string>id</string>
|
||||
<key>toggle_fullscreen</key>
|
||||
<string>id</string>
|
||||
<key>x11_help</key>
|
||||
<string>id</string>
|
||||
<key>zoom_window</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>X11Controller</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>apps_separator</key>
|
||||
<string>id</string>
|
||||
<key>apps_table</key>
|
||||
<string>id</string>
|
||||
<key>depth</key>
|
||||
<string>id</string>
|
||||
<key>dock_apps_menu</key>
|
||||
<string>id</string>
|
||||
<key>dock_menu</key>
|
||||
<string>id</string>
|
||||
<key>dock_window_separator</key>
|
||||
<string>id</string>
|
||||
<key>enable_auth</key>
|
||||
<string>id</string>
|
||||
<key>enable_fullscreen</key>
|
||||
<string>id</string>
|
||||
<key>enable_keyequivs</key>
|
||||
<string>id</string>
|
||||
<key>enable_tcp</key>
|
||||
<string>id</string>
|
||||
<key>fake_buttons</key>
|
||||
<string>id</string>
|
||||
<key>prefs_panel</key>
|
||||
<string>id</string>
|
||||
<key>sync_keymap</key>
|
||||
<string>id</string>
|
||||
<key>toggle_fullscreen_item</key>
|
||||
<string>id</string>
|
||||
<key>use_sysbeep</key>
|
||||
<string>id</string>
|
||||
<key>window_separator</key>
|
||||
<string>id</string>
|
||||
<key>x11_about_item</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSNumberFormatter</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSFormatter</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSFormatter</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>alignCenter:</key>
|
||||
<string>id</string>
|
||||
<key>alignJustified:</key>
|
||||
<string>id</string>
|
||||
<key>alignLeft:</key>
|
||||
<string>id</string>
|
||||
<key>alignRight:</key>
|
||||
<string>id</string>
|
||||
<key>arrangeInFront:</key>
|
||||
<string>id</string>
|
||||
<key>centerSelectionInVisibleArea:</key>
|
||||
<string>id</string>
|
||||
<key>changeFont:</key>
|
||||
<string>id</string>
|
||||
<key>checkSpelling:</key>
|
||||
<string>id</string>
|
||||
<key>clear:</key>
|
||||
<string>id</string>
|
||||
<key>clearRecentDocuments:</key>
|
||||
<string>id</string>
|
||||
<key>complete:</key>
|
||||
<string>id</string>
|
||||
<key>copy:</key>
|
||||
<string>id</string>
|
||||
<key>copyFont:</key>
|
||||
<string>id</string>
|
||||
<key>copyRuler:</key>
|
||||
<string>id</string>
|
||||
<key>cut:</key>
|
||||
<string>id</string>
|
||||
<key>delete:</key>
|
||||
<string>id</string>
|
||||
<key>deminiaturize:</key>
|
||||
<string>id</string>
|
||||
<key>fax:</key>
|
||||
<string>id</string>
|
||||
<key>hide:</key>
|
||||
<string>id</string>
|
||||
<key>hideOtherApplications:</key>
|
||||
<string>id</string>
|
||||
<key>loosenKerning:</key>
|
||||
<string>id</string>
|
||||
<key>lowerBaseline:</key>
|
||||
<string>id</string>
|
||||
<key>makeKeyAndOrderFront:</key>
|
||||
<string>id</string>
|
||||
<key>miniaturize:</key>
|
||||
<string>id</string>
|
||||
<key>newDocument:</key>
|
||||
<string>id</string>
|
||||
<key>openDocument:</key>
|
||||
<string>id</string>
|
||||
<key>orderBack:</key>
|
||||
<string>id</string>
|
||||
<key>orderFront:</key>
|
||||
<string>id</string>
|
||||
<key>orderFrontColorPanel:</key>
|
||||
<string>id</string>
|
||||
<key>orderFrontHelpPanel:</key>
|
||||
<string>id</string>
|
||||
<key>orderOut:</key>
|
||||
<string>id</string>
|
||||
<key>outline:</key>
|
||||
<string>id</string>
|
||||
<key>paste:</key>
|
||||
<string>id</string>
|
||||
<key>pasteAsPlainText:</key>
|
||||
<string>id</string>
|
||||
<key>pasteAsRichText:</key>
|
||||
<string>id</string>
|
||||
<key>pasteFont:</key>
|
||||
<string>id</string>
|
||||
<key>pasteRuler:</key>
|
||||
<string>id</string>
|
||||
<key>pause:</key>
|
||||
<string>id</string>
|
||||
<key>performClose:</key>
|
||||
<string>id</string>
|
||||
<key>performFindPanelAction:</key>
|
||||
<string>id</string>
|
||||
<key>performMiniaturize:</key>
|
||||
<string>id</string>
|
||||
<key>performZoom:</key>
|
||||
<string>id</string>
|
||||
<key>play:</key>
|
||||
<string>id</string>
|
||||
<key>print:</key>
|
||||
<string>id</string>
|
||||
<key>printDocument:</key>
|
||||
<string>id</string>
|
||||
<key>raiseBaseline:</key>
|
||||
<string>id</string>
|
||||
<key>record:</key>
|
||||
<string>id</string>
|
||||
<key>redo:</key>
|
||||
<string>id</string>
|
||||
<key>resume:</key>
|
||||
<string>id</string>
|
||||
<key>revertDocumentToSaved:</key>
|
||||
<string>id</string>
|
||||
<key>run:</key>
|
||||
<string>id</string>
|
||||
<key>runPageLayout:</key>
|
||||
<string>id</string>
|
||||
<key>runToolbarCustomizationPalette:</key>
|
||||
<string>id</string>
|
||||
<key>saveAllDocuments:</key>
|
||||
<string>id</string>
|
||||
<key>saveDocument:</key>
|
||||
<string>id</string>
|
||||
<key>saveDocumentAs:</key>
|
||||
<string>id</string>
|
||||
<key>saveDocumentTo:</key>
|
||||
<string>id</string>
|
||||
<key>selectAll:</key>
|
||||
<string>id</string>
|
||||
<key>selectText:</key>
|
||||
<string>id</string>
|
||||
<key>showGuessPanel:</key>
|
||||
<string>id</string>
|
||||
<key>showHelp:</key>
|
||||
<string>id</string>
|
||||
<key>start:</key>
|
||||
<string>id</string>
|
||||
<key>startSpeaking:</key>
|
||||
<string>id</string>
|
||||
<key>stop:</key>
|
||||
<string>id</string>
|
||||
<key>stopSpeaking:</key>
|
||||
<string>id</string>
|
||||
<key>subscript:</key>
|
||||
<string>id</string>
|
||||
<key>superscript:</key>
|
||||
<string>id</string>
|
||||
<key>terminate:</key>
|
||||
<string>id</string>
|
||||
<key>tightenKerning:</key>
|
||||
<string>id</string>
|
||||
<key>toggleContinuousSpellChecking:</key>
|
||||
<string>id</string>
|
||||
<key>toggleRuler:</key>
|
||||
<string>id</string>
|
||||
<key>toggleToolbarShown:</key>
|
||||
<string>id</string>
|
||||
<key>turnOffKerning:</key>
|
||||
<string>id</string>
|
||||
<key>turnOffLigatures:</key>
|
||||
<string>id</string>
|
||||
<key>underline:</key>
|
||||
<string>id</string>
|
||||
<key>undo:</key>
|
||||
<string>id</string>
|
||||
<key>unhideAllApplications:</key>
|
||||
<string>id</string>
|
||||
<key>unscript:</key>
|
||||
<string>id</string>
|
||||
<key>useAllLigatures:</key>
|
||||
<string>id</string>
|
||||
<key>useStandardKerning:</key>
|
||||
<string>id</string>
|
||||
<key>useStandardLigatures:</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>FirstResponder</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>IBVersion</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</plist>
|
18
hw/darwin/apple/English.lproj/main.nib/info.nib
generated
Normal file
18
hw/darwin/apple/English.lproj/main.nib/info.nib
generated
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>588</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>244</integer>
|
||||
<integer>29</integer>
|
||||
<integer>423</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9A356</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCocoaFramework</string>
|
||||
</dict>
|
||||
</plist>
|
BIN
hw/darwin/apple/English.lproj/main.nib/keyedobjects.nib
generated
Normal file
BIN
hw/darwin/apple/English.lproj/main.nib/keyedobjects.nib
generated
Normal file
Binary file not shown.
71
hw/darwin/apple/Info.plist
Normal file
71
hw/darwin/apple/Info.plist
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>x11app</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>X11.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>X11 Application</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>****</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSIsAppleDefaultForType</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>tool</string>
|
||||
<string>*</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>UNIX Application</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>****</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>X11</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>X11</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>X11.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.x.X11</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>X11</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2003-2007, Apple Inc.
|
||||
Copyright © 2003, XFree86 Project, Inc.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>main</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>X11Application</string>
|
||||
</dict>
|
||||
</plist>
|
BIN
hw/darwin/apple/X11.icns
Normal file
BIN
hw/darwin/apple/X11.icns
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user