Merge branch 'master' into XACE-SELINUX
Conflicts: Xext/xace.c Xext/xace.h
This commit is contained in:
commit
1603130236
|
@ -8,6 +8,9 @@ Makefile.in
|
||||||
*.a
|
*.a
|
||||||
*.o
|
*.o
|
||||||
*~
|
*~
|
||||||
|
.*.swp
|
||||||
|
obj*
|
||||||
|
build*
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
compile
|
compile
|
||||||
|
@ -296,4 +299,3 @@ mfb/mfbteblack.c
|
||||||
mfb/mfbtewhite.c
|
mfb/mfbtewhite.c
|
||||||
mfb/mfbtileC.c
|
mfb/mfbtileC.c
|
||||||
mfb/mfbtileG.c
|
mfb/mfbtileG.c
|
||||||
.*.swp
|
|
||||||
|
|
200
COPYING
200
COPYING
|
@ -1,3 +1,45 @@
|
||||||
|
The following is the 'standard copyright' agreed upon by most contributors,
|
||||||
|
and is currently the canonical license, though a modification is currently
|
||||||
|
under discussion. Copyright holders of new code should use this license
|
||||||
|
statement where possible, and append their name to this list. Please sort
|
||||||
|
by surname for people, and by the full name for other entities (e.g.
|
||||||
|
Juliusz Chroboczek sorts before Intel Corporation sorts before Daniel
|
||||||
|
Stone).
|
||||||
|
|
||||||
|
Copyright © 2000-2001 Juliusz Chroboczek
|
||||||
|
Copyright © 2006-2007 Intel Corporation
|
||||||
|
Copyright © 2006 Nokia Corporation
|
||||||
|
Copyright © 1999 Keith Packard
|
||||||
|
Copyright © 2005-2007 Daniel Stone
|
||||||
|
Copyright © 2006 Luc Verhaegen
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
to deal in the Software without restriction, including without limitation
|
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice (including the next
|
||||||
|
paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS 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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
The following licenses are 'legacy': usually MIT/X11 licenses with the name
|
||||||
|
of the copyright holder(s) in the license statement, but also some BSD-like
|
||||||
|
licenses.
|
||||||
|
|
||||||
|
|
||||||
Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.
|
Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
@ -1058,27 +1100,6 @@ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
PERFORMANCE OF THIS SOFTWARE.
|
PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
Copyright © 2003-2005 Keith Packard, Daniel Stone
|
|
||||||
|
|
||||||
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, and that the names of Keith Packard and Daniel Stone not be
|
|
||||||
used in advertising or publicity pertaining to distribution of the software
|
|
||||||
without specific, written prior permission. Keith Packard and Daniel Stone
|
|
||||||
make no representations about the suitability of this software for any
|
|
||||||
purpose. It is provided "as is" without express or implied warranty.
|
|
||||||
|
|
||||||
KEITH PACKARD AND DANIEL STONE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|
|
||||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
|
|
||||||
IN NO EVENT SHALL KEITH PACKARD OR DANIEL STONE BE LIABLE FOR ANY SPECIAL,
|
|
||||||
INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
||||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|
||||||
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright © 1999 Keith Packard
|
Copyright © 1999 Keith Packard
|
||||||
Copyright © 2000 Compaq Computer Corporation
|
Copyright © 2000 Compaq Computer Corporation
|
||||||
Copyright © 2002 MontaVista Software Inc.
|
Copyright © 2002 MontaVista Software Inc.
|
||||||
|
@ -2357,54 +2378,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 1999 by Keith Packard
|
|
||||||
Copyright © 2006 Intel Corporation
|
|
||||||
Copyright 2006 Luc Verhaegen.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
copy of this software and associated documentation files (the "Software"),
|
|
||||||
to deal in the Software without restriction, including without limitation
|
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice (including the next
|
|
||||||
paragraph) shall be included in all copies or substantial portions of the
|
|
||||||
Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
THE AUTHORS OR COPYRIGHT HOLDERS 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.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2000-2001 by Juliusz Chroboczek
|
|
||||||
Copyright (c) 1999 by Keith Packard
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice 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 AUTHORS OR COPYRIGHT HOLDERS
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany
|
Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany
|
||||||
Copyright 1992 by David Dawes <dawes@XFree86.org>
|
Copyright 1992 by David Dawes <dawes@XFree86.org>
|
||||||
Copyright 1992 by Jim Tsillas <jtsilla@damon.ccs.northeastern.edu>
|
Copyright 1992 by Jim Tsillas <jtsilla@damon.ccs.northeastern.edu>
|
||||||
|
@ -2622,92 +2595,3 @@ FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||||
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
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.
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
Copyright © 2006 Daniel Stone
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
copy of this software and associated documentation files (the "Software"),
|
|
||||||
to deal in the Software without restriction, including without limitation
|
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice (including the next
|
|
||||||
paragraph) shall be included in all copies or substantial portions of the
|
|
||||||
Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
THE AUTHORS OR COPYRIGHT HOLDERS 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.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright © 2006-2007 Daniel Stone
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
copy of this software and associated documentation files (the "Software"),
|
|
||||||
to deal in the Software without restriction, including without limitation
|
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice (including the next
|
|
||||||
paragraph) shall be included in all copies or substantial portions of the
|
|
||||||
Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
THE AUTHORS OR COPYRIGHT HOLDERS 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.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright © 2007 Daniel Stone
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
copy of this software and associated documentation files (the "Software"),
|
|
||||||
to deal in the Software without restriction, including without limitation
|
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice (including the next
|
|
||||||
paragraph) shall be included in all copies or substantial portions of the
|
|
||||||
Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
THE AUTHORS OR COPYRIGHT HOLDERS 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.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright © 1999 Keith Packard
|
|
||||||
Copyright © 2006 Nokia Corporation
|
|
||||||
|
|
||||||
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, and that the name of the authors not be used in
|
|
||||||
advertising or publicity pertaining to distribution of the software without
|
|
||||||
specific, written prior permission. The authors make no
|
|
||||||
representations about the suitability of this software for any purpose. It
|
|
||||||
is provided "as is" without express or implied warranty.
|
|
||||||
|
|
||||||
THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
||||||
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
||||||
EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
||||||
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
||||||
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
|
|
|
@ -5169,31 +5169,6 @@ void __glXDisp_LoadProgramNV(GLbyte * pc)
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void __glXDisp_ProgramParameter4dvNV(GLbyte * pc)
|
|
||||||
{
|
|
||||||
#ifdef __GLX_ALIGN64
|
|
||||||
if ((unsigned long)(pc) & 7) {
|
|
||||||
(void) memmove(pc-4, pc, 40);
|
|
||||||
pc -= 4;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CALL_ProgramParameter4dvNV( GET_DISPATCH(), (
|
|
||||||
*(GLenum *)(pc + 0),
|
|
||||||
*(GLuint *)(pc + 4),
|
|
||||||
(const GLdouble *)(pc + 8)
|
|
||||||
) );
|
|
||||||
}
|
|
||||||
|
|
||||||
void __glXDisp_ProgramParameter4fvNV(GLbyte * pc)
|
|
||||||
{
|
|
||||||
CALL_ProgramParameter4fvNV( GET_DISPATCH(), (
|
|
||||||
*(GLenum *)(pc + 0),
|
|
||||||
*(GLuint *)(pc + 4),
|
|
||||||
(const GLfloat *)(pc + 8)
|
|
||||||
) );
|
|
||||||
}
|
|
||||||
|
|
||||||
void __glXDisp_ProgramParameters4dvNV(GLbyte * pc)
|
void __glXDisp_ProgramParameters4dvNV(GLbyte * pc)
|
||||||
{
|
{
|
||||||
const GLuint num = *(GLuint *)(pc + 8);
|
const GLuint num = *(GLuint *)(pc + 8);
|
||||||
|
|
|
@ -149,8 +149,6 @@ extern HIDDEN int __glXDisp_GetProgramNamedParameterfvNV(struct __GLXclientState
|
||||||
extern HIDDEN int __glXDispSwap_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_PointParameterfEXT(GLbyte * pc);
|
extern HIDDEN void __glXDisp_PointParameterfEXT(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_PointParameterfEXT(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_PointParameterfEXT(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_ProgramParameter4dvNV(GLbyte * pc);
|
|
||||||
extern HIDDEN void __glXDispSwap_ProgramParameter4dvNV(GLbyte * pc);
|
|
||||||
extern HIDDEN void __glXDisp_TexCoord2sv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_TexCoord2sv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_TexCoord2sv(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_TexCoord2sv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_Vertex4dv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Vertex4dv(GLbyte * pc);
|
||||||
|
@ -425,8 +423,6 @@ extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_ProgramParameter4fvNV(GLbyte * pc);
|
|
||||||
extern HIDDEN void __glXDispSwap_ProgramParameter4fvNV(GLbyte * pc);
|
|
||||||
extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_Color4ubv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_Color4ubv(GLbyte * pc);
|
||||||
|
|
|
@ -5325,31 +5325,6 @@ void __glXDispSwap_LoadProgramNV(GLbyte * pc)
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void __glXDispSwap_ProgramParameter4dvNV(GLbyte * pc)
|
|
||||||
{
|
|
||||||
#ifdef __GLX_ALIGN64
|
|
||||||
if ((unsigned long)(pc) & 7) {
|
|
||||||
(void) memmove(pc-4, pc, 40);
|
|
||||||
pc -= 4;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CALL_ProgramParameter4dvNV( GET_DISPATCH(), (
|
|
||||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
|
||||||
(GLuint )bswap_CARD32 ( pc + 4 ),
|
|
||||||
(const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 )
|
|
||||||
) );
|
|
||||||
}
|
|
||||||
|
|
||||||
void __glXDispSwap_ProgramParameter4fvNV(GLbyte * pc)
|
|
||||||
{
|
|
||||||
CALL_ProgramParameter4fvNV( GET_DISPATCH(), (
|
|
||||||
(GLenum )bswap_ENUM ( pc + 0 ),
|
|
||||||
(GLuint )bswap_CARD32 ( pc + 4 ),
|
|
||||||
(const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 )
|
|
||||||
) );
|
|
||||||
}
|
|
||||||
|
|
||||||
void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc)
|
void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc)
|
||||||
{
|
{
|
||||||
const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 );
|
const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 );
|
||||||
|
|
|
@ -652,6 +652,10 @@ __glGetBooleanv_size(GLenum e)
|
||||||
case GL_WEIGHT_ARRAY_SIZE_ARB:
|
case GL_WEIGHT_ARRAY_SIZE_ARB:
|
||||||
case GL_WEIGHT_ARRAY_ARB:
|
case GL_WEIGHT_ARRAY_ARB:
|
||||||
case GL_PACK_INVERT_MESA:
|
case GL_PACK_INVERT_MESA:
|
||||||
|
case GL_STENCIL_BACK_FUNC_ATI:
|
||||||
|
case GL_STENCIL_BACK_FAIL_ATI:
|
||||||
|
case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI:
|
||||||
|
case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI:
|
||||||
case GL_FRAGMENT_PROGRAM_ARB:
|
case GL_FRAGMENT_PROGRAM_ARB:
|
||||||
case GL_MAX_DRAW_BUFFERS_ARB:
|
case GL_MAX_DRAW_BUFFERS_ARB:
|
||||||
/* case GL_MAX_DRAW_BUFFERS_ATI:*/
|
/* case GL_MAX_DRAW_BUFFERS_ATI:*/
|
||||||
|
|
|
@ -644,7 +644,7 @@ static const void *Render_function_table[400][2] = {
|
||||||
/* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV},
|
/* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV},
|
||||||
/* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV},
|
/* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV},
|
||||||
/* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV},
|
/* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV},
|
||||||
/* [ 304] = 4184 */ {__glXDisp_ProgramParameter4fvNV, __glXDispSwap_ProgramParameter4fvNV},
|
/* [ 304] = 4184 */ {__glXDisp_ProgramEnvParameter4fvARB, __glXDispSwap_ProgramEnvParameter4fvARB},
|
||||||
/* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB, __glXDispSwap_ProgramEnvParameter4dvARB},
|
/* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB, __glXDispSwap_ProgramEnvParameter4dvARB},
|
||||||
/* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV},
|
/* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV},
|
||||||
/* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV},
|
/* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV},
|
||||||
|
|
75
Xext/xace.c
75
Xext/xace.c
|
@ -42,6 +42,22 @@ static int (*SwappedUntrustedProcVector[256])(
|
||||||
ClientPtr /*client*/
|
ClientPtr /*client*/
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* Special-cased hook functions. Called by Xserver.
|
||||||
|
*/
|
||||||
|
void XaceHookAuditBegin(ClientPtr ptr)
|
||||||
|
{
|
||||||
|
XaceAuditRec rec = { ptr, 0 };
|
||||||
|
/* call callbacks, there is no return value. */
|
||||||
|
CallCallbacks(&XaceHooks[XACE_AUDIT_BEGIN], &rec);
|
||||||
|
}
|
||||||
|
|
||||||
|
void XaceHookAuditEnd(ClientPtr ptr, int result)
|
||||||
|
{
|
||||||
|
XaceAuditRec rec = { ptr, result };
|
||||||
|
/* call callbacks, there is no return value. */
|
||||||
|
CallCallbacks(&XaceHooks[XACE_AUDIT_END], &rec);
|
||||||
|
}
|
||||||
|
|
||||||
/* Entry point for hook functions. Called by Xserver.
|
/* Entry point for hook functions. Called by Xserver.
|
||||||
*/
|
*/
|
||||||
int XaceHook(int hook, ...)
|
int XaceHook(int hook, ...)
|
||||||
|
@ -58,26 +74,6 @@ int XaceHook(int hook, ...)
|
||||||
*/
|
*/
|
||||||
switch (hook)
|
switch (hook)
|
||||||
{
|
{
|
||||||
case XACE_CORE_DISPATCH: {
|
|
||||||
XaceCoreDispatchRec rec = {
|
|
||||||
va_arg(ap, ClientPtr),
|
|
||||||
Success /* default allow */
|
|
||||||
};
|
|
||||||
calldata = &rec;
|
|
||||||
prv = &rec.status;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XACE_EXT_DISPATCH: {
|
|
||||||
XaceExtAccessRec rec = {
|
|
||||||
va_arg(ap, ClientPtr),
|
|
||||||
va_arg(ap, ExtensionEntry*),
|
|
||||||
DixUseAccess,
|
|
||||||
Success /* default allow */
|
|
||||||
};
|
|
||||||
calldata = &rec;
|
|
||||||
prv = &rec.status;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XACE_RESOURCE_ACCESS: {
|
case XACE_RESOURCE_ACCESS: {
|
||||||
XaceResourceAccessRec rec = {
|
XaceResourceAccessRec rec = {
|
||||||
va_arg(ap, ClientPtr),
|
va_arg(ap, ClientPtr),
|
||||||
|
@ -213,22 +209,6 @@ int XaceHook(int hook, ...)
|
||||||
calldata = &rec;
|
calldata = &rec;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case XACE_AUDIT_BEGIN: {
|
|
||||||
XaceAuditRec rec = {
|
|
||||||
va_arg(ap, ClientPtr),
|
|
||||||
0
|
|
||||||
};
|
|
||||||
calldata = &rec;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case XACE_AUDIT_END: {
|
|
||||||
XaceAuditRec rec = {
|
|
||||||
va_arg(ap, ClientPtr),
|
|
||||||
va_arg(ap, int)
|
|
||||||
};
|
|
||||||
calldata = &rec;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: {
|
default: {
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return 0; /* unimplemented hook number */
|
return 0; /* unimplemented hook number */
|
||||||
|
@ -293,14 +273,17 @@ static int
|
||||||
XaceCatchDispatchProc(ClientPtr client)
|
XaceCatchDispatchProc(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
int rc, major = stuff->reqType;
|
int major = stuff->reqType;
|
||||||
|
XaceCoreDispatchRec rec = { client, Success /* default allow */ };
|
||||||
|
|
||||||
if (!ProcVector[major])
|
if (!ProcVector[major])
|
||||||
return (BadRequest);
|
return BadRequest;
|
||||||
|
|
||||||
rc = XaceHook(XACE_CORE_DISPATCH, client);
|
/* call callbacks and return result, if any. */
|
||||||
if (rc != Success)
|
CallCallbacks(&XaceHooks[XACE_CORE_DISPATCH], &rec);
|
||||||
return rc;
|
|
||||||
|
if (rec.status != Success)
|
||||||
|
return rec.status;
|
||||||
|
|
||||||
return client->swapped ?
|
return client->swapped ?
|
||||||
(* SwappedProcVector[major])(client) :
|
(* SwappedProcVector[major])(client) :
|
||||||
|
@ -313,12 +296,16 @@ XaceCatchExtProc(ClientPtr client)
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
int major = stuff->reqType;
|
int major = stuff->reqType;
|
||||||
ExtensionEntry *ext = GetExtensionEntry(major);
|
ExtensionEntry *ext = GetExtensionEntry(major);
|
||||||
|
XaceExtAccessRec rec = { client, ext, DixUseAccess, Success };
|
||||||
|
|
||||||
if (!ext || !ProcVector[major])
|
if (!ext || !ProcVector[major])
|
||||||
return (BadRequest);
|
return BadRequest;
|
||||||
|
|
||||||
if (XaceHook(XACE_EXT_DISPATCH, client, ext) != Success)
|
/* call callbacks and return result, if any. */
|
||||||
return (BadRequest); /* pretend extension doesn't exist */
|
CallCallbacks(&XaceHooks[XACE_EXT_DISPATCH], &rec);
|
||||||
|
|
||||||
|
if (rec.status != Success)
|
||||||
|
return BadRequest; /* pretend extension doesn't exist */
|
||||||
|
|
||||||
return client->swapped ?
|
return client->swapped ?
|
||||||
(* SwappedProcVector[major])(client) :
|
(* SwappedProcVector[major])(client) :
|
||||||
|
|
|
@ -63,6 +63,11 @@ extern int XaceHook(
|
||||||
... /*appropriate args for hook*/
|
... /*appropriate args for hook*/
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* Special-cased hook functions
|
||||||
|
*/
|
||||||
|
extern void XaceHookAuditEnd(ClientPtr ptr, int result);
|
||||||
|
extern void XaceHookAuditBegin(ClientPtr ptr);
|
||||||
|
|
||||||
/* Register a callback for a given hook.
|
/* Register a callback for a given hook.
|
||||||
*/
|
*/
|
||||||
#define XaceRegisterCallback(hook,callback,data) \
|
#define XaceRegisterCallback(hook,callback,data) \
|
||||||
|
@ -93,9 +98,13 @@ extern void XaceCensorImage(
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define XaceHook(args...) Success
|
#define XaceHook(args...) Success
|
||||||
|
#define XaceHookAuditEnd(args...) { ; }
|
||||||
|
#define XaceHookAuditBegin(args...) { ; }
|
||||||
#define XaceCensorImage(args...) { ; }
|
#define XaceCensorImage(args...) { ; }
|
||||||
#else
|
#else
|
||||||
#define XaceHook(...) Success
|
#define XaceHook(...) Success
|
||||||
|
#define XaceHookAuditEnd(...) { ; }
|
||||||
|
#define XaceHookAuditBegin(...) { ; }
|
||||||
#define XaceCensorImage(...) { ; }
|
#define XaceCensorImage(...) { ; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -355,8 +355,8 @@ connect_hook(DBusConnection *connection, void *data)
|
||||||
|
|
||||||
dbus_error_init(&error);
|
dbus_error_init(&error);
|
||||||
|
|
||||||
if (!dbus_bus_request_name(info->connection, info->busname,
|
dbus_bus_request_name(info->connection, info->busname, 0, &error);
|
||||||
0, &error)) {
|
if (dbus_error_is_set(&error)) {
|
||||||
ErrorF("[config/dbus] couldn't take over org.x.config: %s (%s)\n",
|
ErrorF("[config/dbus] couldn't take over org.x.config: %s (%s)\n",
|
||||||
error.name, error.message);
|
error.name, error.message);
|
||||||
goto err_start;
|
goto err_start;
|
||||||
|
|
|
@ -1237,7 +1237,7 @@ AC_MSG_RESULT([$XNEST])
|
||||||
AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes])
|
AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes])
|
||||||
|
|
||||||
if test "x$XNEST" = xyes; then
|
if test "x$XNEST" = xyes; then
|
||||||
XNEST_LIBS="$CONFIG_LIB $FB_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 $CWRAP_LIB"
|
XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_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 $CWRAP_LIB $DIX_LIB $OS_LIB $CONFIG_LIB"
|
||||||
XNEST_SYS_LIBS="$XNESTMODULES_LIBS"
|
XNEST_SYS_LIBS="$XNESTMODULES_LIBS"
|
||||||
AC_SUBST([XNEST_LIBS])
|
AC_SUBST([XNEST_LIBS])
|
||||||
AC_SUBST([XNEST_SYS_LIBS])
|
AC_SUBST([XNEST_SYS_LIBS])
|
||||||
|
@ -1764,7 +1764,8 @@ return 0;}
|
||||||
# LDFLAGS=$save_LDFLAGS
|
# LDFLAGS=$save_LDFLAGS
|
||||||
# ])
|
# ])
|
||||||
xorg_cv_AGL_framework=no
|
xorg_cv_AGL_framework=no
|
||||||
DARWIN_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_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"
|
DARWIN_GLX_LIBS='$(top_builddir)/GL/apple/indirect.o $(top_builddir)/GL/glx/libglx.la'
|
||||||
|
DARWIN_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $DARWIN_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"
|
||||||
AC_SUBST([DARWIN_LIBS])
|
AC_SUBST([DARWIN_LIBS])
|
||||||
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
||||||
AC_SUBST([APPLE_APPLICATIONS_DIR])
|
AC_SUBST([APPLE_APPLICATIONS_DIR])
|
||||||
|
@ -1873,6 +1874,8 @@ if test "$KDRIVE" = yes; then
|
||||||
XEPHYR_DRI=no
|
XEPHYR_DRI=no
|
||||||
if test x$XEPHYR = xyes -a x$DRI = xyes; then
|
if test x$XEPHYR = xyes -a x$DRI = xyes; then
|
||||||
XEPHYR_DRI=yes
|
XEPHYR_DRI=yes
|
||||||
|
XEPHYR_DRI_LIBS=-lGL
|
||||||
|
AC_SUBST(XEPHYR_DRI_LIBS)
|
||||||
fi
|
fi
|
||||||
if test x$XEPHYR_DRI = xyes ; then
|
if test x$XEPHYR_DRI = xyes ; then
|
||||||
AC_DEFINE(XEPHYR_DRI,1,[enable DRI extension in xephyr])
|
AC_DEFINE(XEPHYR_DRI,1,[enable DRI extension in xephyr])
|
||||||
|
@ -1934,6 +1937,7 @@ AM_CONDITIONAL(KDRIVEFBDEV, [test "x$XFBDEV" = xyes])
|
||||||
AM_CONDITIONAL(XSDLSERVER, [test x"$XSDL" = xyes])
|
AM_CONDITIONAL(XSDLSERVER, [test x"$XSDL" = xyes])
|
||||||
AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes])
|
AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes])
|
||||||
AM_CONDITIONAL(BUILD_KDRIVEFBDEVLIB, [test "x$KDRIVE" = xyes && test "x$KDRIVEFBDEVLIB" = xyes])
|
AM_CONDITIONAL(BUILD_KDRIVEFBDEVLIB, [test "x$KDRIVE" = xyes && test "x$KDRIVEFBDEVLIB" = xyes])
|
||||||
|
AM_CONDITIONAL(XEPHYR_HAS_DRI, [test x$XEPHYR_DRI = xyes])
|
||||||
AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes])
|
AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes])
|
||||||
|
|
||||||
dnl these only go in xkb-config.h (which is shared by the Xorg and Xnest servers)
|
dnl these only go in xkb-config.h (which is shared by the Xorg and Xnest servers)
|
||||||
|
|
|
@ -524,6 +524,7 @@ CloseDevice(DeviceIntPtr dev)
|
||||||
if (dev->key->xkbInfo)
|
if (dev->key->xkbInfo)
|
||||||
XkbFreeInfo(dev->key->xkbInfo);
|
XkbFreeInfo(dev->key->xkbInfo);
|
||||||
#endif
|
#endif
|
||||||
|
dev->key->xkbInfo = NULL;
|
||||||
xfree(dev->key->curKeySyms.map);
|
xfree(dev->key->curKeySyms.map);
|
||||||
xfree(dev->key->modifierKeyMap);
|
xfree(dev->key->modifierKeyMap);
|
||||||
xfree(dev->key);
|
xfree(dev->key);
|
||||||
|
|
|
@ -471,9 +471,9 @@ Dispatch(void)
|
||||||
if (result > (maxBigRequestSize << 2))
|
if (result > (maxBigRequestSize << 2))
|
||||||
result = BadLength;
|
result = BadLength;
|
||||||
else {
|
else {
|
||||||
XaceHook(XACE_AUDIT_BEGIN, client);
|
XaceHookAuditBegin(client);
|
||||||
result = (* client->requestVector[MAJOROP])(client);
|
result = (* client->requestVector[MAJOROP])(client);
|
||||||
XaceHook(XACE_AUDIT_END, client, result);
|
XaceHookAuditEnd(client, result);
|
||||||
}
|
}
|
||||||
#ifdef XSERVER_DTRACE
|
#ifdef XSERVER_DTRACE
|
||||||
XSERVER_REQUEST_DONE(GetRequestName(MAJOROP), MAJOROP,
|
XSERVER_REQUEST_DONE(GetRequestName(MAJOROP), MAJOROP,
|
||||||
|
|
|
@ -207,11 +207,13 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator,
|
||||||
*
|
*
|
||||||
* Should be used in DIX as:
|
* Should be used in DIX as:
|
||||||
* xEvent *events = xcalloc(sizeof(xEvent), GetMaximumEventsNum());
|
* xEvent *events = xcalloc(sizeof(xEvent), GetMaximumEventsNum());
|
||||||
|
*
|
||||||
|
* This MUST be absolutely constant, from init until exit.
|
||||||
*/
|
*/
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
GetMaximumEventsNum(void) {
|
GetMaximumEventsNum(void) {
|
||||||
/* Two base events -- core and device, plus valuator events. Multiply
|
/* Two base events -- core and device, plus valuator events. Multiply
|
||||||
* by two if we're doing key repeats. */
|
* by two if we're doing non-XKB key repeats. */
|
||||||
int ret = 2 + MAX_VALUATOR_EVENTS;
|
int ret = 2 + MAX_VALUATOR_EVENTS;
|
||||||
|
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
|
|
|
@ -153,6 +153,15 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
|
||||||
REGION_SUBTRACT(pScreen, &CopyReg, pValidSrc, pValidDst);
|
REGION_SUBTRACT(pScreen, &CopyReg, pValidSrc, pValidDst);
|
||||||
|
|
||||||
if (migrate->as_dst) {
|
if (migrate->as_dst) {
|
||||||
|
ExaScreenPriv (pPixmap->drawable.pScreen);
|
||||||
|
|
||||||
|
/* XXX: The pending damage region will be marked as damaged after the
|
||||||
|
* operation, so it should serve as an upper bound for the region that
|
||||||
|
* needs to be synchronized for the operation. Unfortunately, this
|
||||||
|
* causes corruption in some cases, e.g. when starting compiz. See
|
||||||
|
* https://bugs.freedesktop.org/show_bug.cgi?id=12916 .
|
||||||
|
*/
|
||||||
|
if (pExaScr->optimize_migration) {
|
||||||
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
||||||
|
|
||||||
if (REGION_NIL(pending_damage)) {
|
if (REGION_NIL(pending_damage)) {
|
||||||
|
@ -165,10 +174,18 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
|
||||||
}
|
}
|
||||||
|
|
||||||
REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, pending_damage);
|
REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, pending_damage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The caller may provide a region to be subtracted from the calculated
|
||||||
|
* dirty region. This is to avoid migration of bits that don't
|
||||||
|
* contribute to the result of the operation.
|
||||||
|
*/
|
||||||
if (migrate->pReg)
|
if (migrate->pReg)
|
||||||
REGION_SUBTRACT(pScreen, &CopyReg, &CopyReg, migrate->pReg);
|
REGION_SUBTRACT(pScreen, &CopyReg, &CopyReg, migrate->pReg);
|
||||||
} else {
|
} else {
|
||||||
|
/* The caller may restrict the region to be migrated for source pixmaps
|
||||||
|
* to what's relevant for the operation.
|
||||||
|
*/
|
||||||
if (migrate->pReg)
|
if (migrate->pReg)
|
||||||
REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, migrate->pReg);
|
REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, migrate->pReg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,6 +119,7 @@ typedef struct {
|
||||||
enum ExaMigrationHeuristic migration;
|
enum ExaMigrationHeuristic migration;
|
||||||
Bool checkDirtyCorrectness;
|
Bool checkDirtyCorrectness;
|
||||||
unsigned disableFbCount;
|
unsigned disableFbCount;
|
||||||
|
Bool optimize_migration;
|
||||||
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -196,20 +196,20 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
|
||||||
case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown:
|
case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown:
|
||||||
case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp:
|
case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp:
|
||||||
if ([e window] != nil) {
|
if ([e window] != nil) {
|
||||||
/* Pointer event has a window. Probably something for the kit. */
|
/* Pointer event has an (AppKit) window. Probably something for the kit. */
|
||||||
|
|
||||||
for_x = NO;
|
for_x = NO;
|
||||||
|
|
||||||
if (_x_active) [self activateX:NO];
|
if (_x_active) [self activateX:NO];
|
||||||
} else if ([self modalWindow] == nil) {
|
} else if ([self modalWindow] == nil) {
|
||||||
/* Must be an X window. Tell appkit it doesn't have focus. */
|
/* Must be an X window. Tell appkit it doesn't have focus. */
|
||||||
|
WindowPtr pWin = xprGetXWindowFromAppKit([e windowNumber]);
|
||||||
|
if (pWin) RootlessReorderWindow(pWin);
|
||||||
for_appkit = NO;
|
for_appkit = NO;
|
||||||
|
|
||||||
if ([self isActive]) {
|
if ([self isActive]) {
|
||||||
[self deactivate];
|
[self deactivate];
|
||||||
|
|
||||||
if (!_x_active && quartzProcs->IsX11Window([e window], [e windowNumber]))
|
if (!_x_active && quartzProcs->IsX11Window([e window],
|
||||||
|
[e windowNumber]))
|
||||||
[self activateX:YES];
|
[self activateX:YES];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -220,9 +220,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
|
||||||
static int swallow_up;
|
static int swallow_up;
|
||||||
|
|
||||||
/* No kit window is focused, so send it to X. */
|
/* No kit window is focused, so send it to X. */
|
||||||
|
|
||||||
for_appkit = NO;
|
for_appkit = NO;
|
||||||
|
|
||||||
if (type == NSKeyDown) {
|
if (type == NSKeyDown) {
|
||||||
/* Before that though, see if there are any global
|
/* Before that though, see if there are any global
|
||||||
shortcuts bound to it. */
|
shortcuts bound to it. */
|
||||||
|
@ -251,14 +249,12 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
|
||||||
for_x = NO;
|
for_x = NO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else for_x = NO;
|
||||||
else for_x = NO;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSFlagsChanged:
|
case NSFlagsChanged:
|
||||||
/* For the l33t X users who remap modifier keys to normal keysyms. */
|
/* For the l33t X users who remap modifier keys to normal keysyms. */
|
||||||
if (!_x_active)
|
if (!_x_active) for_x = NO;
|
||||||
for_x = NO;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSAppKitDefined:
|
case NSAppKitDefined:
|
||||||
|
@ -292,6 +288,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (for_appkit) [super sendEvent:e];
|
if (for_appkit) [super sendEvent:e];
|
||||||
|
|
||||||
if (for_x) send_nsevent (type, e);
|
if (for_x) send_nsevent (type, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -596,7 +593,8 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
|
||||||
CFPreferencesAppSynchronize (kCFPreferencesCurrentApplication);
|
CFPreferencesAppSynchronize (kCFPreferencesCurrentApplication);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) read_defaults {
|
- (void) read_defaults
|
||||||
|
{
|
||||||
const char *tem;
|
const char *tem;
|
||||||
|
|
||||||
quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP
|
quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP
|
||||||
|
@ -623,7 +621,6 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
|
||||||
|
|
||||||
if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2);
|
if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2);
|
||||||
if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3);
|
if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS
|
X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS
|
||||||
|
@ -633,7 +630,6 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
|
||||||
default:darwinSyncKeymap];
|
default:darwinSyncKeymap];
|
||||||
|
|
||||||
tem = [self prefs_get_string:@PREFS_KEYMAP_FILE default:NULL];
|
tem = [self prefs_get_string:@PREFS_KEYMAP_FILE default:NULL];
|
||||||
|
|
||||||
if (tem != NULL) darwinKeymapFile = strdup (tem);
|
if (tem != NULL) darwinKeymapFile = strdup (tem);
|
||||||
else darwinKeymapFile = NULL;
|
else darwinKeymapFile = NULL;
|
||||||
|
|
||||||
|
@ -800,19 +796,13 @@ void X11ApplicationMain (int argc, const char *argv[],
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pool = [[NSAutoreleasePool alloc] init];
|
pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
X11App = (X11Application *) [X11Application sharedApplication];
|
X11App = (X11Application *) [X11Application sharedApplication];
|
||||||
|
|
||||||
init_ports ();
|
init_ports ();
|
||||||
|
|
||||||
[NSApp read_defaults];
|
[NSApp read_defaults];
|
||||||
|
|
||||||
[NSBundle loadNibNamed:@"main" owner:NSApp];
|
[NSBundle loadNibNamed:@"main" owner:NSApp];
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:NSApp
|
[[NSNotificationCenter defaultCenter] addObserver:NSApp
|
||||||
selector:@selector (became_key:)
|
selector:@selector (became_key:)
|
||||||
name:NSWindowDidBecomeKeyNotification object:nil];
|
name:NSWindowDidBecomeKeyNotification object:nil];
|
||||||
|
|
||||||
check_xinitrc ();
|
check_xinitrc ();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -823,7 +813,7 @@ void X11ApplicationMain (int argc, const char *argv[],
|
||||||
|
|
||||||
/* Calculate the height of the menubar so we can avoid it. */
|
/* Calculate the height of the menubar so we can avoid it. */
|
||||||
aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) -
|
aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) -
|
||||||
NSMaxY([[NSScreen mainScreen] visibleFrame]) - 1;
|
NSMaxY([[NSScreen mainScreen] visibleFrame]);
|
||||||
|
|
||||||
if (!create_thread (server_thread, server_arg)) {
|
if (!create_thread (server_thread, server_arg)) {
|
||||||
ErrorF("can't create secondary thread\n");
|
ErrorF("can't create secondary thread\n");
|
||||||
|
@ -831,6 +821,8 @@ void X11ApplicationMain (int argc, const char *argv[],
|
||||||
}
|
}
|
||||||
|
|
||||||
[NSApp run];
|
[NSApp run];
|
||||||
|
|
||||||
|
/* not reached */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,6 @@ enum {
|
||||||
= LASTEvent+1, // (from X.h list of event names)
|
= LASTEvent+1, // (from X.h list of event names)
|
||||||
kXDarwinUpdateButtons, // update state of mouse buttons 2 and up
|
kXDarwinUpdateButtons, // update state of mouse buttons 2 and up
|
||||||
kXDarwinScrollWheel, // scroll wheel event
|
kXDarwinScrollWheel, // scroll wheel event
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Quartz-specific events -- not used in IOKit mode
|
* Quartz-specific events -- not used in IOKit mode
|
||||||
*/
|
*/
|
||||||
|
@ -142,6 +141,8 @@ enum {
|
||||||
kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer
|
kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer
|
||||||
kXDarwinWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard
|
kXDarwinWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard
|
||||||
kXDarwinBringAllToFront, // bring all X windows to front
|
kXDarwinBringAllToFront, // bring all X windows to front
|
||||||
|
kXDarwinToggleFullscreen, // Enable/Disable fullscreen mode
|
||||||
|
kXDarwinSetRootless, // Set rootless mode
|
||||||
/*
|
/*
|
||||||
* AppleWM events
|
* AppleWM events
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -334,8 +334,22 @@ void DarwinModeProcessEvent(
|
||||||
xEvent *xe)
|
xEvent *xe)
|
||||||
{
|
{
|
||||||
switch (xe->u.u.type) {
|
switch (xe->u.u.type) {
|
||||||
|
case kXDarwinControllerNotify:
|
||||||
|
AppleWMSendEvent(AppleWMControllerNotify,
|
||||||
|
AppleWMControllerNotifyMask,
|
||||||
|
xe->u.clientMessage.u.l.longs0,
|
||||||
|
xe->u.clientMessage.u.l.longs1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case kXDarwinPasteboardNotify:
|
||||||
|
AppleWMSendEvent(AppleWMPasteboardNotify,
|
||||||
|
AppleWMPasteboardNotifyMask,
|
||||||
|
xe->u.clientMessage.u.l.longs0,
|
||||||
|
xe->u.clientMessage.u.l.longs1);
|
||||||
|
break;
|
||||||
|
|
||||||
case kXDarwinActivate:
|
case kXDarwinActivate:
|
||||||
|
// ErrorF("kXDarwinActivate\n");
|
||||||
QuartzShow(xe->u.keyButtonPointer.rootX,
|
QuartzShow(xe->u.keyButtonPointer.rootX,
|
||||||
xe->u.keyButtonPointer.rootY);
|
xe->u.keyButtonPointer.rootY);
|
||||||
AppleWMSendEvent(AppleWMActivationNotify,
|
AppleWMSendEvent(AppleWMActivationNotify,
|
||||||
|
@ -344,12 +358,48 @@ void DarwinModeProcessEvent(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kXDarwinDeactivate:
|
case kXDarwinDeactivate:
|
||||||
|
// ErrorF("kXDarwinDeactivate\n");
|
||||||
AppleWMSendEvent(AppleWMActivationNotify,
|
AppleWMSendEvent(AppleWMActivationNotify,
|
||||||
AppleWMActivationNotifyMask,
|
AppleWMActivationNotifyMask,
|
||||||
AppleWMIsInactive, 0);
|
AppleWMIsInactive, 0);
|
||||||
QuartzHide();
|
QuartzHide();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case kXDarwinDisplayChanged:
|
||||||
|
// ErrorF("kXDarwinDisplayChanged\n");
|
||||||
|
QuartzUpdateScreens();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case kXDarwinWindowState:
|
||||||
|
// ErrorF("kXDarwinWindowState\n");
|
||||||
|
RootlessNativeWindowStateChanged(xe->u.clientMessage.u.l.longs0,
|
||||||
|
xe->u.clientMessage.u.l.longs1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case kXDarwinWindowMoved:
|
||||||
|
// ErrorF("kXDarwinWindowMoved\n");
|
||||||
|
RootlessNativeWindowMoved (xe->u.clientMessage.u.l.longs0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case kXDarwinToggleFullscreen:
|
||||||
|
#ifdef DARWIN_DDX_MISSING
|
||||||
|
if (quartzEnableRootless) QuartzSetFullscreen(!quartzHasRoot);
|
||||||
|
else if (quartzHasRoot) QuartzHide();
|
||||||
|
else QuartzShow();
|
||||||
|
#else
|
||||||
|
// ErrorF("kXDarwinToggleFullscreen not implemented\n");
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
|
||||||
|
case kXDarwinSetRootless:
|
||||||
|
#ifdef DARWIN_DDX_MISSING
|
||||||
|
QuartzSetRootless(xe->u.clientMessage.u.l.longs0);
|
||||||
|
if (!quartzEnableRootless && !quartzHasRoot) QuartzHide();
|
||||||
|
#else
|
||||||
|
// ErrorF("kXDarwinSetRootless not implemented\n");
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
|
||||||
case kXDarwinSetRootClip:
|
case kXDarwinSetRootClip:
|
||||||
QuartzSetRootClip((BOOL)xe->u.clientMessage.u.l.longs0);
|
QuartzSetRootClip((BOOL)xe->u.clientMessage.u.l.longs0);
|
||||||
break;
|
break;
|
||||||
|
@ -366,46 +416,13 @@ void DarwinModeProcessEvent(
|
||||||
QuartzWritePasteboard();
|
QuartzWritePasteboard();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
|
||||||
* AppleWM events
|
|
||||||
*/
|
|
||||||
case kXDarwinControllerNotify:
|
|
||||||
AppleWMSendEvent(AppleWMControllerNotify,
|
|
||||||
AppleWMControllerNotifyMask,
|
|
||||||
xe->u.clientMessage.u.l.longs0,
|
|
||||||
xe->u.clientMessage.u.l.longs1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kXDarwinPasteboardNotify:
|
|
||||||
AppleWMSendEvent(AppleWMPasteboardNotify,
|
|
||||||
AppleWMPasteboardNotifyMask,
|
|
||||||
xe->u.clientMessage.u.l.longs0,
|
|
||||||
xe->u.clientMessage.u.l.longs1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kXDarwinDisplayChanged:
|
|
||||||
QuartzUpdateScreens();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kXDarwinBringAllToFront:
|
case kXDarwinBringAllToFront:
|
||||||
|
// ErrorF("kXDarwinBringAllToFront\n");
|
||||||
RootlessOrderAllWindows();
|
RootlessOrderAllWindows();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kXDarwinWindowState:
|
|
||||||
ErrorF("kXDarwinWindowState\n");
|
|
||||||
break;
|
|
||||||
case kXDarwinWindowMoved: {
|
|
||||||
WindowPtr pWin = (WindowPtr)xe->u.clientMessage.u.l.longs0;
|
|
||||||
short x = xe->u.clientMessage.u.l.longs1,
|
|
||||||
y = xe->u.clientMessage.u.l.longs2;
|
|
||||||
ErrorF("kXDarwinWindowMoved(%p, %hd, %hd)\n", pWin, x, y);
|
|
||||||
RootlessMoveWindow(pWin, x, y, pWin->nextSib, VTMove);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ErrorF("Unknown application defined event type %d.\n",
|
ErrorF("Unknown application defined event type %d.\n", xe->u.u.type);
|
||||||
xe->u.u.type);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,6 +122,7 @@ typedef struct _QuartzModeProcs {
|
||||||
} QuartzModeProcsRec, *QuartzModeProcsPtr;
|
} QuartzModeProcsRec, *QuartzModeProcsPtr;
|
||||||
|
|
||||||
extern QuartzModeProcsPtr quartzProcs;
|
extern QuartzModeProcsPtr quartzProcs;
|
||||||
|
extern int quartzHasRoot, quartzEnableRootless;
|
||||||
|
|
||||||
Bool QuartzLoadDisplayBundle(const char *dpyBundleName);
|
Bool QuartzLoadDisplayBundle(const char *dpyBundleName);
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/*
|
/*
|
||||||
quartzKeyboard.c
|
quartzKeyboard.c
|
||||||
|
|
||||||
Code to build a keymap using the Carbon Keyboard Layout API,
|
Code to build a keymap using the Carbon Keyboard Layout API.
|
||||||
which is supported on Mac OS X 10.2 and newer.
|
|
||||||
|
|
||||||
Copyright (c) 2003, 2007 Apple Inc.
|
Copyright (c) 2003, 2007 Apple Inc.
|
||||||
|
|
||||||
|
@ -150,15 +149,11 @@ unsigned int
|
||||||
DarwinModeSystemKeymapSeed (void)
|
DarwinModeSystemKeymapSeed (void)
|
||||||
{
|
{
|
||||||
static unsigned int seed;
|
static unsigned int seed;
|
||||||
|
|
||||||
static KeyboardLayoutRef last_key_layout;
|
static KeyboardLayoutRef last_key_layout;
|
||||||
KeyboardLayoutRef key_layout;
|
KeyboardLayoutRef key_layout;
|
||||||
|
|
||||||
KLGetCurrentKeyboardLayout (&key_layout);
|
KLGetCurrentKeyboardLayout (&key_layout);
|
||||||
|
if (key_layout != last_key_layout) seed++;
|
||||||
if (key_layout != last_key_layout)
|
|
||||||
seed++;
|
|
||||||
|
|
||||||
last_key_layout = key_layout;
|
last_key_layout = key_layout;
|
||||||
|
|
||||||
return seed;
|
return seed;
|
||||||
|
@ -190,10 +185,8 @@ macroman2ucs (unsigned char c)
|
||||||
0xaf, 0x2d8, 0x2d9, 0x2da, 0xb8, 0x2dd, 0x2db, 0x2c7,
|
0xaf, 0x2d8, 0x2d9, 0x2da, 0xb8, 0x2dd, 0x2db, 0x2c7,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (c < 128)
|
if (c < 128) return c;
|
||||||
return c;
|
else return table[c - 128];
|
||||||
else
|
|
||||||
return table[c - 128];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static KeySym
|
static KeySym
|
||||||
|
@ -202,10 +195,7 @@ make_dead_key (KeySym in)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < sizeof (dead_keys) / sizeof (dead_keys[0]); i++)
|
for (i = 0; i < sizeof (dead_keys) / sizeof (dead_keys[0]); i++)
|
||||||
{
|
if (dead_keys[i].normal == in) return dead_keys[i].dead;
|
||||||
if (dead_keys[i].normal == in)
|
|
||||||
return dead_keys[i].dead;
|
|
||||||
}
|
|
||||||
|
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
@ -222,35 +212,26 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
|
||||||
KeySym *k;
|
KeySym *k;
|
||||||
|
|
||||||
TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
|
TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
|
||||||
if (currentKeyLayoutRef)
|
keyboard_type = LMGetKbdType ();
|
||||||
{
|
if (currentKeyLayoutRef) {
|
||||||
CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
|
CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
|
||||||
if (currentKeyLayoutDataRef)
|
if (currentKeyLayoutDataRef) chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
|
||||||
chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chr_data == NULL) {
|
if (chr_data == NULL) {
|
||||||
KLGetCurrentKeyboardLayout (&key_layout);
|
KLGetCurrentKeyboardLayout (&key_layout);
|
||||||
KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
|
KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
|
||||||
|
|
||||||
if (chr_data != NULL)
|
|
||||||
{
|
|
||||||
is_uchr = 1;
|
|
||||||
keyboard_type = LMGetKbdType ();
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
if (chr_data == NULL) {
|
||||||
KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
|
KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
|
||||||
|
|
||||||
if (chr_data == NULL)
|
|
||||||
{
|
|
||||||
ErrorF ( "Couldn't get uchr or kchr resource\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
is_uchr = 0;
|
is_uchr = 0;
|
||||||
num_keycodes = 128;
|
num_keycodes = 128;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (chr_data == NULL) {
|
||||||
|
ErrorF ( "Couldn't get uchr or kchr resource\n");
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scan the keycode range for the Unicode character that each
|
/* Scan the keycode range for the Unicode character that each
|
||||||
|
@ -258,53 +239,39 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
|
||||||
an X11 keysym (which may just the bit that says "this is
|
an X11 keysym (which may just the bit that says "this is
|
||||||
Unicode" if it can't find the real symbol.) */
|
Unicode" if it can't find the real symbol.) */
|
||||||
|
|
||||||
for (i = 0; i < num_keycodes; i++)
|
for (i = 0; i < num_keycodes; i++) {
|
||||||
{
|
|
||||||
static const int mods[4] = {0, MOD_SHIFT, MOD_OPTION,
|
static const int mods[4] = {0, MOD_SHIFT, MOD_OPTION,
|
||||||
MOD_OPTION | MOD_SHIFT};
|
MOD_OPTION | MOD_SHIFT};
|
||||||
|
|
||||||
k = info->keyMap + i * GLYPHS_PER_KEY;
|
k = info->keyMap + i * GLYPHS_PER_KEY;
|
||||||
|
|
||||||
for (j = 0; j < 4; j++)
|
for (j = 0; j < 4; j++) {
|
||||||
{
|
if (is_uchr) {
|
||||||
if (is_uchr)
|
|
||||||
{
|
|
||||||
UniChar s[8];
|
UniChar s[8];
|
||||||
UniCharCount len;
|
UniCharCount len;
|
||||||
UInt32 dead_key_state, extra_dead;
|
UInt32 dead_key_state = 0, extra_dead = 0;
|
||||||
|
|
||||||
dead_key_state = 0;
|
|
||||||
err = UCKeyTranslate (chr_data, i, kUCKeyActionDown,
|
err = UCKeyTranslate (chr_data, i, kUCKeyActionDown,
|
||||||
mods[j] >> 8, keyboard_type, 0,
|
mods[j] >> 8, keyboard_type, 0,
|
||||||
&dead_key_state, 8, &len, s);
|
&dead_key_state, 8, &len, s);
|
||||||
if (err != noErr)
|
if (err != noErr) continue;
|
||||||
continue;
|
|
||||||
|
|
||||||
if (len == 0 && dead_key_state != 0)
|
if (len == 0 && dead_key_state != 0) {
|
||||||
{
|
|
||||||
/* Found a dead key. Work out which one it is, but
|
/* Found a dead key. Work out which one it is, but
|
||||||
remembering that it's dead. */
|
remembering that it's dead. */
|
||||||
|
|
||||||
extra_dead = 0;
|
|
||||||
err = UCKeyTranslate (chr_data, i, kUCKeyActionDown,
|
err = UCKeyTranslate (chr_data, i, kUCKeyActionDown,
|
||||||
mods[j] >> 8, keyboard_type,
|
mods[j] >> 8, keyboard_type,
|
||||||
kUCKeyTranslateNoDeadKeysMask,
|
kUCKeyTranslateNoDeadKeysMask,
|
||||||
&extra_dead, 8, &len, s);
|
&extra_dead, 8, &len, s);
|
||||||
if (err != noErr)
|
if (err != noErr) continue;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len > 0 && s[0] != 0x0010)
|
if (len > 0 && s[0] != 0x0010) {
|
||||||
{
|
|
||||||
k[j] = ucs2keysym (s[0]);
|
k[j] = ucs2keysym (s[0]);
|
||||||
|
if (dead_key_state != 0) k[j] = make_dead_key (k[j]);
|
||||||
if (dead_key_state != 0)
|
|
||||||
k[j] = make_dead_key (k[j]);
|
|
||||||
}
|
}
|
||||||
}
|
} else { // kchr
|
||||||
else
|
UInt32 c, state = 0, state2 = 0;
|
||||||
{
|
|
||||||
UInt32 c, state = 0;
|
|
||||||
UInt16 code;
|
UInt16 code;
|
||||||
|
|
||||||
code = i | mods[j];
|
code = i | mods[j];
|
||||||
|
@ -316,65 +283,48 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
|
||||||
us the actual dead character. */
|
us the actual dead character. */
|
||||||
|
|
||||||
if (state != 0)
|
if (state != 0)
|
||||||
{
|
|
||||||
UInt32 state2 = 0;
|
|
||||||
c = KeyTranslate (chr_data, code | 128, &state2);
|
c = KeyTranslate (chr_data, code | 128, &state2);
|
||||||
}
|
|
||||||
|
|
||||||
/* Characters seem to be in MacRoman encoding. */
|
/* Characters seem to be in MacRoman encoding. */
|
||||||
|
|
||||||
if (c != 0 && c != 0x0010)
|
if (c != 0 && c != 0x0010) {
|
||||||
{
|
|
||||||
k[j] = ucs2keysym (macroman2ucs (c & 255));
|
k[j] = ucs2keysym (macroman2ucs (c & 255));
|
||||||
|
|
||||||
if (state != 0)
|
if (state != 0) k[j] = make_dead_key (k[j]);
|
||||||
k[j] = make_dead_key (k[j]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k[3] == k[2])
|
if (k[3] == k[2]) k[3] = NoSymbol;
|
||||||
k[3] = NoSymbol;
|
if (k[2] == k[1]) k[2] = NoSymbol;
|
||||||
if (k[2] == k[1])
|
if (k[1] == k[0]) k[1] = NoSymbol;
|
||||||
k[2] = NoSymbol;
|
if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
|
||||||
if (k[1] == k[0])
|
|
||||||
k[1] = NoSymbol;
|
|
||||||
if (k[0] == k[2] && k[1] == k[3])
|
|
||||||
k[2] = k[3] = NoSymbol;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fix up some things that are normally missing.. */
|
/* Fix up some things that are normally missing.. */
|
||||||
|
|
||||||
if (HACK_MISSING)
|
if (HACK_MISSING) {
|
||||||
{
|
for (i = 0; i < sizeof (known_keys) / sizeof (known_keys[0]); i++) {
|
||||||
for (i = 0; i < sizeof (known_keys) / sizeof (known_keys[0]); i++)
|
|
||||||
{
|
|
||||||
k = info->keyMap + known_keys[i].keycode * GLYPHS_PER_KEY;
|
k = info->keyMap + known_keys[i].keycode * GLYPHS_PER_KEY;
|
||||||
|
|
||||||
if (k[0] == NoSymbol && k[1] == NoSymbol
|
if (k[0] == NoSymbol && k[1] == NoSymbol
|
||||||
&& k[2] == NoSymbol && k[3] == NoSymbol)
|
&& k[2] == NoSymbol && k[3] == NoSymbol)
|
||||||
{
|
|
||||||
k[0] = known_keys[i].keysym;
|
k[0] = known_keys[i].keysym;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* And some more things. We find the right symbols for the numeric
|
/* And some more things. We find the right symbols for the numeric
|
||||||
keypad, but not the KP_ keysyms. So try to convert known keycodes. */
|
keypad, but not the KP_ keysyms. So try to convert known keycodes. */
|
||||||
|
|
||||||
if (HACK_KEYPAD)
|
if (HACK_KEYPAD) {
|
||||||
{
|
|
||||||
for (i = 0; i < sizeof (known_numeric_keys)
|
for (i = 0; i < sizeof (known_numeric_keys)
|
||||||
/ sizeof (known_numeric_keys[0]); i++)
|
/ sizeof (known_numeric_keys[0]); i++) {
|
||||||
{
|
|
||||||
k = info->keyMap + known_numeric_keys[i].keycode * GLYPHS_PER_KEY;
|
k = info->keyMap + known_numeric_keys[i].keycode * GLYPHS_PER_KEY;
|
||||||
|
|
||||||
if (k[0] == known_numeric_keys[i].normal)
|
if (k[0] == known_numeric_keys[i].normal)
|
||||||
{
|
|
||||||
k[0] = known_numeric_keys[i].keypad;
|
k[0] = known_numeric_keys[i].keypad;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
|
if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -38,6 +38,7 @@ void AppleDRIExtensionInit(void);
|
||||||
void xprAppleWMInit(void);
|
void xprAppleWMInit(void);
|
||||||
Bool xprInit(ScreenPtr pScreen);
|
Bool xprInit(ScreenPtr pScreen);
|
||||||
Bool xprIsX11Window(void *nsWindow, int windowNumber);
|
Bool xprIsX11Window(void *nsWindow, int windowNumber);
|
||||||
|
|
||||||
void xprHideWindows(Bool hide);
|
void xprHideWindows(Bool hide);
|
||||||
|
|
||||||
Bool QuartzInitCursor(ScreenPtr pScreen);
|
Bool QuartzInitCursor(ScreenPtr pScreen);
|
||||||
|
|
|
@ -67,6 +67,7 @@ static inline xp_error
|
||||||
xprConfigureWindow(xp_window_id id, unsigned int mask,
|
xprConfigureWindow(xp_window_id id, unsigned int mask,
|
||||||
const xp_window_changes *values)
|
const xp_window_changes *values)
|
||||||
{
|
{
|
||||||
|
// ErrorF("xprConfigureWindow()\n");
|
||||||
if (!no_configure_window)
|
if (!no_configure_window)
|
||||||
return xp_configure_window(id, mask, values);
|
return xp_configure_window(id, mask, values);
|
||||||
else
|
else
|
||||||
|
@ -184,7 +185,7 @@ xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY)
|
||||||
|
|
||||||
wc.x = newX;
|
wc.x = newX;
|
||||||
wc.y = newY;
|
wc.y = newY;
|
||||||
|
// ErrorF("xprMoveFrame(%d, %p, %d, %d)\n", wid, pScreen, newX, newY);
|
||||||
xprConfigureWindow((xp_window_id) wid, XP_ORIGIN, &wc);
|
xprConfigureWindow((xp_window_id) wid, XP_ORIGIN, &wc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,6 +424,37 @@ xprGetXWindow(xp_window_id wid)
|
||||||
return winRec != NULL ? winRec->win : NULL;
|
return winRec != NULL ? winRec->win : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Given the id of a physical window, try to find the top-level (or root)
|
||||||
|
* X window that it represents.
|
||||||
|
*/
|
||||||
|
WindowPtr
|
||||||
|
xprGetXWindowFromAppKit(int windowNumber)
|
||||||
|
{
|
||||||
|
RootlessWindowRec *winRec;
|
||||||
|
Bool ret;
|
||||||
|
xp_window_id wid;
|
||||||
|
|
||||||
|
if (window_hash == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
/* need to lock, since this function can be called by any thread */
|
||||||
|
|
||||||
|
pthread_mutex_lock(&window_hash_mutex);
|
||||||
|
|
||||||
|
if (xp_lookup_native_window(windowNumber, &wid))
|
||||||
|
ret = xprGetXWindow(wid) != NULL;
|
||||||
|
else
|
||||||
|
ret = FALSE;
|
||||||
|
|
||||||
|
pthread_mutex_unlock(&window_hash_mutex);
|
||||||
|
|
||||||
|
if (!ret) return NULL;
|
||||||
|
winRec = x_hash_table_lookup(window_hash, (void *) wid, NULL);
|
||||||
|
|
||||||
|
return winRec != NULL ? winRec->win : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The windowNumber is an AppKit window number. Returns TRUE if xpr is
|
* The windowNumber is an AppKit window number. Returns TRUE if xpr is
|
||||||
|
|
|
@ -228,7 +228,7 @@ xprDisplayInit(void)
|
||||||
else
|
else
|
||||||
darwinScreensFound = 1;
|
darwinScreensFound = 1;
|
||||||
|
|
||||||
if (xp_init(XP_IN_BACKGROUND) != Success)
|
if (xp_init(XP_IN_BACKGROUND | XP_NO_DEFERRED_UPDATES) != Success)
|
||||||
FatalError("Could not initialize the Xplugin library.");
|
FatalError("Could not initialize the Xplugin library.");
|
||||||
|
|
||||||
xp_select_events(XP_EVENT_DISPLAY_CHANGED
|
xp_select_events(XP_EVENT_DISPLAY_CHANGED
|
||||||
|
|
|
@ -3,47 +3,65 @@ INCLUDES = \
|
||||||
@KDRIVE_CFLAGS@ \
|
@KDRIVE_CFLAGS@ \
|
||||||
-I$(srcdir)/../../../exa
|
-I$(srcdir)/../../../exa
|
||||||
|
|
||||||
noinst_LIBRARIES = libxephyr-hostx.a libxephyr-hostxv.a libxephyr.a
|
if XV
|
||||||
|
LIBXEPHYR_HOSTXV=libxephyr-hostxv.a
|
||||||
|
else
|
||||||
|
LIBXEPHYR_HOSTXV=
|
||||||
|
endif
|
||||||
|
|
||||||
|
if XEPHYR_HAS_DRI
|
||||||
|
LIBXEPHYR_HOSTDRI=libxephyr-hostdri.a
|
||||||
|
else
|
||||||
|
LIBXEPHYR_HOSTDRI=
|
||||||
|
endif
|
||||||
|
|
||||||
|
noinst_LIBRARIES = libxephyr-hostx.a $(LIBXEPHYR_HOSTXV) $(LIBXEPHYR_HOSTDRI) libxephyr.a
|
||||||
|
|
||||||
bin_PROGRAMS = Xephyr
|
bin_PROGRAMS = Xephyr
|
||||||
|
|
||||||
|
|
||||||
libxephyr_hostx_a_SOURCES = \
|
libxephyr_hostx_a_SOURCES = \
|
||||||
hostx.c \
|
hostx.c \
|
||||||
hostx.h
|
hostx.h
|
||||||
|
|
||||||
libxephyr_hostx_a_INCLUDES = @XEPHYR_INCS@
|
libxephyr_hostxv_a_INCLUDES = @XEPHYR_INCS@
|
||||||
|
|
||||||
|
if XV
|
||||||
libxephyr_hostxv_a_SOURCES= \
|
libxephyr_hostxv_a_SOURCES= \
|
||||||
ephyrhostvideo.c \
|
ephyrhostvideo.c \
|
||||||
ephyrhostvideo.h
|
ephyrhostvideo.h
|
||||||
|
endif
|
||||||
|
|
||||||
|
if XEPHYR_HAS_DRI
|
||||||
|
|
||||||
|
libxephyr_hostdri_a_SOURCES= \
|
||||||
|
ephyrdriext.c \
|
||||||
|
ephyrdri.c \
|
||||||
|
ephyrdri.h \
|
||||||
|
XF86dri.c \
|
||||||
|
ephyrglxext.c \
|
||||||
|
ephyrglxext.h \
|
||||||
|
ephyrhostglx.c \
|
||||||
|
ephyrhostglx.h
|
||||||
|
|
||||||
|
libxephyr_hostdri_a_CFLAGS= \
|
||||||
|
-I$(top_srcdir) \
|
||||||
|
@LIBDRM_CFLAGS@ \
|
||||||
|
@DRIPROTO_CFLAGS@
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
libxephyr_a_SOURCES = \
|
libxephyr_a_SOURCES = \
|
||||||
ephyr.c \
|
ephyr.c \
|
||||||
ephyr_draw.c \
|
ephyr_draw.c \
|
||||||
ephyrvideo.c \
|
ephyrvideo.c \
|
||||||
XF86dri.c \
|
|
||||||
ephyrdriext.c \
|
|
||||||
ephyrdri.c \
|
|
||||||
ephyrdri.h \
|
|
||||||
ephyrglxext.c \
|
|
||||||
ephyrglxext.h \
|
|
||||||
ephyrhostglx.c \
|
|
||||||
ephyrhostglx.h \
|
|
||||||
ephyrhostproxy.c \
|
|
||||||
ephyrhostproxy.h \
|
|
||||||
ephyrhostproxy.c \
|
|
||||||
ephyrproxyext.c \
|
|
||||||
ephyrproxyext.h \
|
|
||||||
os.c \
|
os.c \
|
||||||
hostx.h \
|
hostx.h \
|
||||||
ephyr.h \
|
ephyr.h \
|
||||||
ephyrlog.h
|
ephyrlog.h
|
||||||
|
|
||||||
libxephyr_a_CFLAGS = \
|
libxephyr_a_CFLAGS = \
|
||||||
@LIBDRM_CFLAGS@ \
|
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
@DRIPROTO_CFLAGS@
|
@LIBDRM_CFLAGS@
|
||||||
|
|
||||||
Xephyr_SOURCES = \
|
Xephyr_SOURCES = \
|
||||||
ephyrinit.c
|
ephyrinit.c
|
||||||
|
@ -51,17 +69,19 @@ Xephyr_SOURCES = \
|
||||||
Xephyr_LDADD = \
|
Xephyr_LDADD = \
|
||||||
libxephyr.a \
|
libxephyr.a \
|
||||||
libxephyr-hostx.a \
|
libxephyr-hostx.a \
|
||||||
libxephyr-hostxv.a \
|
$(LIBXEPHYR_HOSTXV) \
|
||||||
|
$(LIBXEPHYR_HOSTDRI) \
|
||||||
../../../exa/libexa.la \
|
../../../exa/libexa.la \
|
||||||
@KDRIVE_LIBS@ \
|
@KDRIVE_LIBS@ \
|
||||||
@XEPHYR_LIBS@ \
|
@XEPHYR_LIBS@ \
|
||||||
@LIBDRM_LIBS@ \
|
@LIBDRM_LIBS@ \
|
||||||
-lGL
|
@XEPHYR_DRI_LIBS@
|
||||||
|
|
||||||
Xephyr_DEPENDENCIES = \
|
Xephyr_DEPENDENCIES = \
|
||||||
libxephyr.a \
|
libxephyr.a \
|
||||||
libxephyr-hostx.a \
|
libxephyr-hostx.a \
|
||||||
libxephyr-hostxv.a \
|
$(LIBXEPHYR_HOSTXV) \
|
||||||
|
$(LIBXEPHYR_HOSTDRI) \
|
||||||
@KDRIVE_LOCAL_LIBS@
|
@KDRIVE_LOCAL_LIBS@
|
||||||
|
|
||||||
relink:
|
relink:
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#include "ephyrdri.h"
|
#include "ephyrdri.h"
|
||||||
#include "ephyrdriext.h"
|
#include "ephyrdriext.h"
|
||||||
#include "ephyrglxext.h"
|
#include "ephyrglxext.h"
|
||||||
#include "ephyrproxyext.h"
|
|
||||||
#endif /*XEPHYR_DRI*/
|
#endif /*XEPHYR_DRI*/
|
||||||
|
|
||||||
extern int KdTsPhyScreen;
|
extern int KdTsPhyScreen;
|
||||||
|
@ -640,7 +639,6 @@ ephyrInitScreen (ScreenPtr pScreen)
|
||||||
if (!ephyrNoDRI) {
|
if (!ephyrNoDRI) {
|
||||||
ephyrDRIExtensionInit (pScreen) ;
|
ephyrDRIExtensionInit (pScreen) ;
|
||||||
ephyrHijackGLXExtension () ;
|
ephyrHijackGLXExtension () ;
|
||||||
ephyrProxyExtensionInit ("ATIFGLRXDRI") ;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -719,6 +717,10 @@ ephyrRestore (KdCardInfo *card)
|
||||||
void
|
void
|
||||||
ephyrScreenFini (KdScreenInfo *screen)
|
ephyrScreenFini (KdScreenInfo *screen)
|
||||||
{
|
{
|
||||||
|
EphyrScrPriv *scrpriv = screen->driver;
|
||||||
|
if (scrpriv->shadow) {
|
||||||
|
KdShadowFbFree (screen, 0);
|
||||||
|
}
|
||||||
xfree(screen->driver);
|
xfree(screen->driver);
|
||||||
screen->driver = NULL;
|
screen->driver = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,12 @@ Disables acceleration of downloading of pixmap data from the framebuffer.
|
||||||
Not usable with drivers which rely on DownloadFromScreen succeeding.
|
Not usable with drivers which rely on DownloadFromScreen succeeding.
|
||||||
Default: No.
|
Default: No.
|
||||||
.TP
|
.TP
|
||||||
|
.BI "Option \*qEXAOptimizeMigration\*q \*q" boolean \*q
|
||||||
|
Enables an additional optimization for migration of destination pixmaps. This
|
||||||
|
may improve performance in some cases (e.g. when switching virtual desktops with
|
||||||
|
no compositing manager) but causes corruption in others (e.g. when starting
|
||||||
|
compiz). Default: No.
|
||||||
|
.TP
|
||||||
.BI "Option \*qMigrationHeuristic\*q \*q" anystr \*q
|
.BI "Option \*qMigrationHeuristic\*q \*q" anystr \*q
|
||||||
Chooses an alternate pixmap migration heuristic, for debugging purposes. The
|
Chooses an alternate pixmap migration heuristic, for debugging purposes. The
|
||||||
default is intended to be the best performing one for general use, though others
|
default is intended to be the best performing one for general use, though others
|
||||||
|
|
|
@ -49,6 +49,7 @@ typedef enum {
|
||||||
EXAOPT_NO_COMPOSITE,
|
EXAOPT_NO_COMPOSITE,
|
||||||
EXAOPT_NO_UTS,
|
EXAOPT_NO_UTS,
|
||||||
EXAOPT_NO_DFS,
|
EXAOPT_NO_DFS,
|
||||||
|
EXAOPT_OPTIMIZE_MIGRATION
|
||||||
} EXAOpts;
|
} EXAOpts;
|
||||||
|
|
||||||
static const OptionInfoRec EXAOptions[] = {
|
static const OptionInfoRec EXAOptions[] = {
|
||||||
|
@ -60,6 +61,8 @@ static const OptionInfoRec EXAOptions[] = {
|
||||||
OPTV_BOOLEAN, {0}, FALSE },
|
OPTV_BOOLEAN, {0}, FALSE },
|
||||||
{ EXAOPT_NO_DFS, "EXANoDownloadFromScreen",
|
{ EXAOPT_NO_DFS, "EXANoDownloadFromScreen",
|
||||||
OPTV_BOOLEAN, {0}, FALSE },
|
OPTV_BOOLEAN, {0}, FALSE },
|
||||||
|
{ EXAOPT_OPTIMIZE_MIGRATION, "EXAOptimizeMigration",
|
||||||
|
OPTV_BOOLEAN, {0}, FALSE },
|
||||||
{ -1, NULL,
|
{ -1, NULL,
|
||||||
OPTV_NONE, {0}, FALSE }
|
OPTV_NONE, {0}, FALSE }
|
||||||
};
|
};
|
||||||
|
@ -138,6 +141,11 @@ exaDDXDriverInit(ScreenPtr pScreen)
|
||||||
heuristicName);
|
heuristicName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pExaScr->optimize_migration =
|
||||||
|
xf86ReturnOptValBool(pScreenPriv->options,
|
||||||
|
EXAOPT_OPTIMIZE_MIGRATION,
|
||||||
|
FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_COMPOSITE)) {
|
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_COMPOSITE)) {
|
||||||
|
|
|
@ -50,8 +50,7 @@ libfbcmap_a_CFLAGS = $(AM_CFLAGS)
|
||||||
|
|
||||||
XNEST_LIBS = \
|
XNEST_LIBS = \
|
||||||
@XNEST_LIBS@ \
|
@XNEST_LIBS@ \
|
||||||
libfbcmap.a \
|
libfbcmap.a
|
||||||
$(XSERVER_LIBS)
|
|
||||||
|
|
||||||
Xnest_SOURCES = $(SRCS)
|
Xnest_SOURCES = $(SRCS)
|
||||||
|
|
||||||
|
|
|
@ -677,7 +677,7 @@ InitVisualWrap()
|
||||||
{
|
{
|
||||||
miResetInitVisuals();
|
miResetInitVisuals();
|
||||||
#ifdef GLXEXT
|
#ifdef GLXEXT
|
||||||
#ifdef __DARWIN__
|
#ifdef INXDARWINAPP
|
||||||
DarwinGlxWrapInitVisuals(&miInitVisualsProc);
|
DarwinGlxWrapInitVisuals(&miInitVisualsProc);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -74,6 +74,8 @@ typedef struct _RootlessWindowRec {
|
||||||
|
|
||||||
unsigned int is_drawing :1; // Currently drawing?
|
unsigned int is_drawing :1; // Currently drawing?
|
||||||
unsigned int is_reorder_pending :1;
|
unsigned int is_reorder_pending :1;
|
||||||
|
unsigned int is_offscreen :1;
|
||||||
|
unsigned int is_obscured :1;
|
||||||
} RootlessWindowRec, *RootlessWindowPtr;
|
} RootlessWindowRec, *RootlessWindowPtr;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -413,10 +413,12 @@ static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
|
||||||
#define GC_IS_ROOT(pDst) ((pDst)->type == DRAWABLE_WINDOW \
|
#define GC_IS_ROOT(pDst) ((pDst)->type == DRAWABLE_WINDOW \
|
||||||
&& IsRoot ((WindowPtr) (pDst)))
|
&& IsRoot ((WindowPtr) (pDst)))
|
||||||
|
|
||||||
#define GC_SKIP_ROOT(pDst) \
|
#define GC_SKIP_ROOT(pDst, pGC) \
|
||||||
do { \
|
do { \
|
||||||
if (GC_IS_ROOT (pDst)) \
|
if (GC_IS_ROOT (pDst)) { \
|
||||||
|
GCOP_WRAP(pGC); \
|
||||||
return; \
|
return; \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
@ -426,7 +428,7 @@ RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit,
|
||||||
{
|
{
|
||||||
GC_SAVE(pGC);
|
GC_SAVE(pGC);
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("fill spans start ");
|
RL_DEBUG_MSG("fill spans start ");
|
||||||
|
|
||||||
if (nInit <= 0) {
|
if (nInit <= 0) {
|
||||||
|
@ -482,7 +484,7 @@ RootlessSetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc,
|
||||||
int nspans, int sorted)
|
int nspans, int sorted)
|
||||||
{
|
{
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("set spans start ");
|
RL_DEBUG_MSG("set spans start ");
|
||||||
|
|
||||||
if (nspans <= 0) {
|
if (nspans <= 0) {
|
||||||
|
@ -533,7 +535,7 @@ RootlessPutImage(DrawablePtr dst, GCPtr pGC,
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("put image start ");
|
RL_DEBUG_MSG("put image start ");
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
@ -565,7 +567,10 @@ RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC,
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
|
|
||||||
if (GC_IS_ROOT(dst) || GC_IS_ROOT(pSrc))
|
if (GC_IS_ROOT(dst) || GC_IS_ROOT(pSrc))
|
||||||
|
{
|
||||||
|
GCOP_WRAP(pGC);
|
||||||
return NULL; /* nothing exposed */
|
return NULL; /* nothing exposed */
|
||||||
|
}
|
||||||
|
|
||||||
RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)", pSrc, dst);
|
RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)", pSrc, dst);
|
||||||
|
|
||||||
|
@ -615,7 +620,10 @@ static RegionPtr RootlessCopyPlane(DrawablePtr pSrc, DrawablePtr dst,
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
|
|
||||||
if (GC_IS_ROOT(dst) || GC_IS_ROOT(pSrc))
|
if (GC_IS_ROOT(dst) || GC_IS_ROOT(pSrc))
|
||||||
|
{
|
||||||
|
GCOP_WRAP(pGC);
|
||||||
return NULL; /* nothing exposed */
|
return NULL; /* nothing exposed */
|
||||||
|
}
|
||||||
|
|
||||||
RL_DEBUG_MSG("copy plane start ");
|
RL_DEBUG_MSG("copy plane start ");
|
||||||
|
|
||||||
|
@ -652,7 +660,7 @@ static void RootlessPolyPoint(DrawablePtr dst, GCPtr pGC,
|
||||||
int mode, int npt, DDXPointPtr pptInit)
|
int mode, int npt, DDXPointPtr pptInit)
|
||||||
{
|
{
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("polypoint start ");
|
RL_DEBUG_MSG("polypoint start ");
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
@ -746,7 +754,7 @@ static void RootlessPolylines(DrawablePtr dst, GCPtr pGC,
|
||||||
int mode, int npt, DDXPointPtr pptInit)
|
int mode, int npt, DDXPointPtr pptInit)
|
||||||
{
|
{
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("poly lines start ");
|
RL_DEBUG_MSG("poly lines start ");
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
@ -821,7 +829,7 @@ static void RootlessPolySegment(DrawablePtr dst, GCPtr pGC,
|
||||||
int nseg, xSegment *pSeg)
|
int nseg, xSegment *pSeg)
|
||||||
{
|
{
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("poly segment start (win 0x%x)", dst);
|
RL_DEBUG_MSG("poly segment start (win 0x%x)", dst);
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
@ -892,7 +900,7 @@ static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC,
|
||||||
int nRects, xRectangle *pRects)
|
int nRects, xRectangle *pRects)
|
||||||
{
|
{
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("poly rectangle start ");
|
RL_DEBUG_MSG("poly rectangle start ");
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
@ -953,7 +961,7 @@ static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC,
|
||||||
static void RootlessPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc *parcs)
|
static void RootlessPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc *parcs)
|
||||||
{
|
{
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("poly arc start ");
|
RL_DEBUG_MSG("poly arc start ");
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
@ -1009,7 +1017,7 @@ static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC,
|
||||||
{
|
{
|
||||||
GC_SAVE(pGC);
|
GC_SAVE(pGC);
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("fill poly start (win 0x%x, fillStyle 0x%x)", dst,
|
RL_DEBUG_MSG("fill poly start (win 0x%x, fillStyle 0x%x)", dst,
|
||||||
pGC->fillStyle);
|
pGC->fillStyle);
|
||||||
|
|
||||||
|
@ -1083,7 +1091,7 @@ static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC,
|
||||||
{
|
{
|
||||||
GC_SAVE(pGC);
|
GC_SAVE(pGC);
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("fill rect start (win 0x%x, fillStyle 0x%x)", dst,
|
RL_DEBUG_MSG("fill rect start (win 0x%x, fillStyle 0x%x)", dst,
|
||||||
pGC->fillStyle);
|
pGC->fillStyle);
|
||||||
|
|
||||||
|
@ -1138,7 +1146,7 @@ static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC,
|
||||||
{
|
{
|
||||||
GC_SAVE(pGC);
|
GC_SAVE(pGC);
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("fill arc start ");
|
RL_DEBUG_MSG("fill arc start ");
|
||||||
|
|
||||||
if (narcsInit > 0) {
|
if (narcsInit > 0) {
|
||||||
|
@ -1193,7 +1201,7 @@ static void RootlessImageText8(DrawablePtr dst, GCPtr pGC,
|
||||||
{
|
{
|
||||||
GC_SAVE(pGC);
|
GC_SAVE(pGC);
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("imagetext8 start ");
|
RL_DEBUG_MSG("imagetext8 start ");
|
||||||
|
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
|
@ -1247,7 +1255,10 @@ static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC,
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
|
|
||||||
if (GC_IS_ROOT(dst))
|
if (GC_IS_ROOT(dst))
|
||||||
|
{
|
||||||
|
GCOP_WRAP(pGC);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
RL_DEBUG_MSG("polytext8 start ");
|
RL_DEBUG_MSG("polytext8 start ");
|
||||||
|
|
||||||
|
@ -1285,7 +1296,7 @@ static void RootlessImageText16(DrawablePtr dst, GCPtr pGC,
|
||||||
{
|
{
|
||||||
GC_SAVE(pGC);
|
GC_SAVE(pGC);
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("imagetext16 start ");
|
RL_DEBUG_MSG("imagetext16 start ");
|
||||||
|
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
|
@ -1339,7 +1350,10 @@ static int RootlessPolyText16(DrawablePtr dst, GCPtr pGC,
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
|
|
||||||
if (GC_IS_ROOT(dst))
|
if (GC_IS_ROOT(dst))
|
||||||
|
{
|
||||||
|
GCOP_WRAP(pGC);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
RL_DEBUG_MSG("polytext16 start ");
|
RL_DEBUG_MSG("polytext16 start ");
|
||||||
|
|
||||||
|
@ -1378,7 +1392,7 @@ static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC,
|
||||||
{
|
{
|
||||||
GC_SAVE(pGC);
|
GC_SAVE(pGC);
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("imageglyph start ");
|
RL_DEBUG_MSG("imageglyph start ");
|
||||||
|
|
||||||
if (nglyphInit > 0) {
|
if (nglyphInit > 0) {
|
||||||
|
@ -1439,7 +1453,7 @@ static void RootlessPolyGlyphBlt(DrawablePtr dst, GCPtr pGC,
|
||||||
CharInfoPtr *ppci, pointer pglyphBase)
|
CharInfoPtr *ppci, pointer pglyphBase)
|
||||||
{
|
{
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("polyglyph start ");
|
RL_DEBUG_MSG("polyglyph start ");
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
@ -1485,7 +1499,7 @@ RootlessPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst,
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
GCOP_UNWRAP(pGC);
|
GCOP_UNWRAP(pGC);
|
||||||
GC_SKIP_ROOT(dst);
|
GC_SKIP_ROOT(dst, pGC);
|
||||||
RL_DEBUG_MSG("push pixels start ");
|
RL_DEBUG_MSG("push pixels start ");
|
||||||
|
|
||||||
RootlessStartDrawing((WindowPtr) dst);
|
RootlessStartDrawing((WindowPtr) dst);
|
||||||
|
|
|
@ -36,13 +36,23 @@
|
||||||
#include <stddef.h> /* For NULL */
|
#include <stddef.h> /* For NULL */
|
||||||
#include <limits.h> /* For CHAR_BIT */
|
#include <limits.h> /* For CHAR_BIT */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#ifdef __APPLE__
|
||||||
|
//#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xatom.h>
|
||||||
|
#include "mi.h"
|
||||||
|
#include "pixmapstr.h"
|
||||||
|
#include "windowstr.h"
|
||||||
|
#include <Xplugin.h>
|
||||||
|
//#include <X11/extensions/applewm.h>
|
||||||
|
extern int darwinMainScreenX, darwinMainScreenY;
|
||||||
|
#endif
|
||||||
|
#include "fb.h"
|
||||||
|
|
||||||
|
#define AppleWMNumWindowLevels 5
|
||||||
|
|
||||||
#include "rootlessCommon.h"
|
#include "rootlessCommon.h"
|
||||||
#include "rootlessWindow.h"
|
#include "rootlessWindow.h"
|
||||||
|
|
||||||
#include "fb.h"
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef ROOTLESS_GLOBAL_COORDS
|
#ifdef ROOTLESS_GLOBAL_COORDS
|
||||||
#define SCREEN_TO_GLOBAL_X \
|
#define SCREEN_TO_GLOBAL_X \
|
||||||
(dixScreenOrigins[pScreen->myNum].x + rootlessGlobalOffsetX)
|
(dixScreenOrigins[pScreen->myNum].x + rootlessGlobalOffsetX)
|
||||||
|
@ -53,6 +63,127 @@
|
||||||
#define SCREEN_TO_GLOBAL_Y 0
|
#define SCREEN_TO_GLOBAL_Y 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_ATOM_HELPER(func,atom_name) \
|
||||||
|
static Atom func (void) { \
|
||||||
|
static unsigned int generation; \
|
||||||
|
static Atom atom; \
|
||||||
|
if (generation != serverGeneration) { \
|
||||||
|
generation = serverGeneration; \
|
||||||
|
atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \
|
||||||
|
} \
|
||||||
|
return atom; \
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFINE_ATOM_HELPER (xa_native_screen_origin, "_NATIVE_SCREEN_ORIGIN")
|
||||||
|
DEFINE_ATOM_HELPER (xa_native_window_id, "_NATIVE_WINDOW_ID")
|
||||||
|
DEFINE_ATOM_HELPER (xa_apple_no_order_in, "_APPLE_NO_ORDER_IN")
|
||||||
|
|
||||||
|
static Bool no_configure_window;
|
||||||
|
static Bool windows_hidden;
|
||||||
|
// TODO - abstract xp functions
|
||||||
|
|
||||||
|
static const int normal_window_levels[AppleWMNumWindowLevels+1] = {
|
||||||
|
0, 3, 4, 5, LONG_MIN + 30, LONG_MIN + 29,
|
||||||
|
};
|
||||||
|
static const int rooted_window_levels[AppleWMNumWindowLevels+1] = {
|
||||||
|
202, 203, 204, 205, 201, 200
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
configure_window (xp_window_id id, unsigned int mask,
|
||||||
|
const xp_window_changes *values)
|
||||||
|
{
|
||||||
|
if (!no_configure_window)
|
||||||
|
return xp_configure_window (id, mask, values);
|
||||||
|
else
|
||||||
|
return XP_Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*static inline unsigned long
|
||||||
|
current_time_in_seconds (void)
|
||||||
|
{
|
||||||
|
unsigned long t = 0;
|
||||||
|
|
||||||
|
t += currentTime.milliseconds / 1000;
|
||||||
|
t += currentTime.months * 4294967;
|
||||||
|
|
||||||
|
return t;
|
||||||
|
} */
|
||||||
|
|
||||||
|
static inline Bool
|
||||||
|
rootlessHasRoot (ScreenPtr pScreen)
|
||||||
|
{
|
||||||
|
return WINREC (WindowTable[pScreen->myNum]) != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
RootlessNativeWindowStateChanged (xp_window_id id, unsigned int state)
|
||||||
|
{
|
||||||
|
WindowPtr pWin;
|
||||||
|
RootlessWindowRec *winRec;
|
||||||
|
|
||||||
|
pWin = xprGetXWindow (id);
|
||||||
|
if (pWin == NULL) return;
|
||||||
|
|
||||||
|
winRec = WINREC (pWin);
|
||||||
|
if (winRec == NULL) return;
|
||||||
|
|
||||||
|
winRec->is_offscreen = ((state & XP_WINDOW_STATE_OFFSCREEN) != 0);
|
||||||
|
winRec->is_obscured = ((state & XP_WINDOW_STATE_OBSCURED) != 0);
|
||||||
|
// pWin->rootlessUnhittable = winRec->is_offscreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
RootlessNativeWindowMoved (WindowPtr pWin)
|
||||||
|
{
|
||||||
|
xp_box bounds;
|
||||||
|
int sx, sy;
|
||||||
|
XID vlist[2];
|
||||||
|
Mask mask;
|
||||||
|
ClientPtr client;
|
||||||
|
RootlessWindowRec *winRec = WINREC(pWin);
|
||||||
|
|
||||||
|
if (xp_get_window_bounds (winRec->wid, &bounds) != Success) return;
|
||||||
|
|
||||||
|
sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX;
|
||||||
|
sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY;
|
||||||
|
|
||||||
|
/* Fake up a ConfigureWindow packet to resize the window to the current bounds. */
|
||||||
|
|
||||||
|
vlist[0] = (INT16) bounds.x1 - sx;
|
||||||
|
vlist[1] = (INT16) bounds.y1 - sy;
|
||||||
|
mask = CWX | CWY;
|
||||||
|
|
||||||
|
/* pretend we're the owner of the window! */
|
||||||
|
client = LookupClient (pWin->drawable.id, NullClient);
|
||||||
|
|
||||||
|
/* Don't want to do anything to the physical window (avoids
|
||||||
|
notification-response feedback loops) */
|
||||||
|
|
||||||
|
no_configure_window = TRUE;
|
||||||
|
ConfigureWindow (pWin, mask, vlist, client);
|
||||||
|
no_configure_window = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Updates the _NATIVE_SCREEN_ORIGIN property on the given root window. */
|
||||||
|
static void
|
||||||
|
set_screen_origin (WindowPtr pWin)
|
||||||
|
{
|
||||||
|
long data[2];
|
||||||
|
|
||||||
|
if (!IsRoot (pWin))
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* FIXME: move this to an extension? */
|
||||||
|
|
||||||
|
data[0] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].x
|
||||||
|
+ darwinMainScreenX);
|
||||||
|
data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y
|
||||||
|
+ darwinMainScreenY);
|
||||||
|
|
||||||
|
ChangeWindowProperty (pWin, xa_native_screen_origin (), XA_INTEGER,
|
||||||
|
32, PropModeReplace, 2, data, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* RootlessCreateWindow
|
* RootlessCreateWindow
|
||||||
|
@ -565,7 +696,6 @@ RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib)
|
||||||
RL_DEBUG_MSG("restackwindow end\n");
|
RL_DEBUG_MSG("restackwindow end\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Specialized window copy procedures
|
* Specialized window copy procedures
|
||||||
*/
|
*/
|
||||||
|
@ -706,13 +836,13 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
top = TopLevelParent(pWin);
|
top = TopLevelParent(pWin);
|
||||||
if (top == NULL) {
|
if (top == NULL) {
|
||||||
RL_DEBUG_MSG("no parent\n");
|
RL_DEBUG_MSG("no parent\n");
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
winRec = WINREC(top);
|
winRec = WINREC(top);
|
||||||
if (winRec == NULL) {
|
if (winRec == NULL) {
|
||||||
RL_DEBUG_MSG("not framed\n");
|
RL_DEBUG_MSG("not framed\n");
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Move region to window local coords */
|
/* Move region to window local coords */
|
||||||
|
@ -735,6 +865,7 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
RootlessDamageRegion(pWin, prgnSrc);
|
RootlessDamageRegion(pWin, prgnSrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
REGION_UNINIT(pScreen, &rgnDst);
|
REGION_UNINIT(pScreen, &rgnDst);
|
||||||
fbValidateDrawable(&pWin->drawable);
|
fbValidateDrawable(&pWin->drawable);
|
||||||
|
|
||||||
|
|
|
@ -1508,6 +1508,8 @@ SmartScheduleStopTimer (void)
|
||||||
#ifdef SMART_SCHEDULE_POSSIBLE
|
#ifdef SMART_SCHEDULE_POSSIBLE
|
||||||
struct itimerval timer;
|
struct itimerval timer;
|
||||||
|
|
||||||
|
if (SmartScheduleDisable)
|
||||||
|
return;
|
||||||
timer.it_interval.tv_sec = 0;
|
timer.it_interval.tv_sec = 0;
|
||||||
timer.it_interval.tv_usec = 0;
|
timer.it_interval.tv_usec = 0;
|
||||||
timer.it_value.tv_sec = 0;
|
timer.it_value.tv_sec = 0;
|
||||||
|
@ -1522,6 +1524,8 @@ SmartScheduleStartTimer (void)
|
||||||
#ifdef SMART_SCHEDULE_POSSIBLE
|
#ifdef SMART_SCHEDULE_POSSIBLE
|
||||||
struct itimerval timer;
|
struct itimerval timer;
|
||||||
|
|
||||||
|
if (SmartScheduleDisable)
|
||||||
|
return;
|
||||||
timer.it_interval.tv_sec = 0;
|
timer.it_interval.tv_sec = 0;
|
||||||
timer.it_interval.tv_usec = SmartScheduleInterval * 1000;
|
timer.it_interval.tv_usec = SmartScheduleInterval * 1000;
|
||||||
timer.it_value.tv_sec = 0;
|
timer.it_value.tv_sec = 0;
|
||||||
|
|
|
@ -151,6 +151,7 @@ RRCrtcNotify (RRCrtcPtr crtc,
|
||||||
break;
|
break;
|
||||||
if (i == numOutputs)
|
if (i == numOutputs)
|
||||||
{
|
{
|
||||||
|
if (crtc->outputs[j]->crtc == crtc)
|
||||||
crtc->outputs[j]->crtc = NULL;
|
crtc->outputs[j]->crtc = NULL;
|
||||||
RROutputChanged (crtc->outputs[j], FALSE);
|
RROutputChanged (crtc->outputs[j], FALSE);
|
||||||
RRCrtcChanged (crtc, FALSE);
|
RRCrtcChanged (crtc, FALSE);
|
||||||
|
|
Loading…
Reference in New Issue