[PATCH 2/2] rootless: ROOTLESS_GLOBAL_COORDS is always set, so unifdef it.

Jeremy Huddleston jeremyhu at apple.com
Wed Jul 14 12:18:46 PDT 2010


Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>

On Jul 14, 2010, at 11:44, Jamey Sharp wrote:

> Signed-off-by: Jamey Sharp <jamey at minilop.net>
> Cc: Jeremy Huddleston <jeremyhu at apple.com>
> Cc: Jon TURNEY <jon.turney at dronecode.org.uk>
> ---
> miext/rootless/rootlessConfig.h |    2 --
> miext/rootless/README.txt       |   15 ++-------------
> miext/rootless/rootless.h       |    5 +----
> miext/rootless/rootlessCommon.c |    2 --
> miext/rootless/rootlessWindow.c |    5 -----
> 5 files changed, 3 insertions(+), 26 deletions(-)
>
> diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/ 
> rootlessConfig.h
> index 9082ac2..a6c0d25 100644
> --- a/miext/rootless/rootlessConfig.h
> +++ b/miext/rootless/rootlessConfig.h
> @@ -36,7 +36,6 @@
>
> #ifdef __APPLE__
>
> -# define ROOTLESS_GLOBAL_COORDS TRUE
> # define ROOTLESS_PROTECT_ALPHA TRUE
> # define ROOTLESS_REDISPLAY_DELAY 10
> # define ROOTLESS_RESIZE_GRAVITY TRUE
> @@ -51,7 +50,6 @@
>
> #if defined(__CYGWIN__) || defined(WIN32)
>
> -# define ROOTLESS_GLOBAL_COORDS TRUE
> # define ROOTLESS_PROTECT_ALPHA NO
> # define ROOTLESS_REDISPLAY_DELAY 10
> # undef  ROOTLESS_RESIZE_GRAVITY
> diff --git a/miext/rootless/README.txt b/miext/rootless/README.txt
> index 8a6df74..7ec5c41 100644
> --- a/miext/rootless/README.txt
> +++ b/miext/rootless/README.txt
> @@ -76,15 +76,6 @@ rootlessConfig.h to specify compile time options  
> for its platform.
>         The following compile-time options are defined in
> rootlessConfig.h:
>
> -      o ROOTLESS_GLOBAL_COORDS: This option controls the way that  
> frame
> -        coordinates are passed to the rootless implementation. If  
> false,
> -        the coordinates are passed per screen relative to the  
> origin of
> -        the screen the frame is currently on. Some implementations  
> may
> -        prefer to work in a single global coordinate space that  
> spans all
> -        screens. If this option is true, the coordinates are passed  
> after
> -        adding the coordinates of the screen origin and an overall  
> offset of
> -        (rootlessGlobalOffsetX, rootlessGlobalOffsetY).
> -
>       o ROOTLESS_PROTECT_ALPHA: By default for a color bit depth of  
> 24 and
>         32 bits per pixel, fb will overwrite the "unused" 8 bits to  
> optimize
>         drawing speed. If this is true, the alpha channel of frames is
> @@ -107,8 +98,7 @@ rootlessConfig.h:
>
>         The following runtime options are defined in rootless.h:
>
> -      o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These are only
> -        used if ROOTLESS_GLOBAL_COORDS is true. They specify the  
> global
> +      o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These specify  
> the global
>         offset that is applied to all screens when converting from
>         screen-local to global coordinates.
>
> @@ -182,8 +172,7 @@ implementation to indicate the frame to operate  
> on.
>  *              initialized before calling except for pFrame->wid,  
> which
>  *              is set by this function.
>  *  pScreen     Screen on which to place the new frame
> - *  newX, newY  Position of the frame. These will be identical to  
> pFrame-x,
> - *              pFrame->y unless ROOTLESS_GLOBAL_COORDS is set.
> + *  newX, newY  Position of the frame.
>  *  pNewShape   Shape for the frame (in frame-local coordinates).  
> NULL for
>  *              unshaped frames.
>  */
> diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h
> index 2e6e782..359d6c1 100644
> --- a/miext/rootless/rootless.h
> +++ b/miext/rootless/rootless.h
> @@ -76,10 +76,8 @@ typedef struct _RootlessWindowRec {
>
>
> /* Offset for screen-local to global coordinate transforms */
> -#ifdef ROOTLESS_GLOBAL_COORDS
> extern int rootlessGlobalOffsetX;
> extern int rootlessGlobalOffsetY;
> -#endif
>
> /* The minimum number of bytes or pixels for which to use the
>    implementation's accelerated functions. */
> @@ -130,8 +128,7 @@ enum rl_gravity_enum {
>  *              initialized before calling except for pFrame->wid,  
> which
>  *              is set by this function.
>  *  pScreen     Screen on which to place the new frame
> - *  newX, newY  Position of the frame. These will be identical to  
> pFrame-x,
> - *              pFrame->y unless ROOTLESS_GLOBAL_COORDS is set.
> + *  newX, newY  Position of the frame.
>  *  pNewShape   Shape for the frame (in frame-local coordinates).  
> NULL for
>  *              unshaped frames.
>  */
> diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/ 
> rootlessCommon.c
> index f84214c..219844a 100644
> --- a/miext/rootless/rootlessCommon.c
> +++ b/miext/rootless/rootlessCommon.c
> @@ -43,10 +43,8 @@ unsigned int rootless_CopyBytes_threshold = 0;
> unsigned int rootless_FillBytes_threshold = 0;
> unsigned int rootless_CompositePixels_threshold = 0;
> unsigned int rootless_CopyWindow_threshold = 0;
> -#ifdef ROOTLESS_GLOBAL_COORDS
> int rootlessGlobalOffsetX = 0;
> int rootlessGlobalOffsetY = 0;
> -#endif
>
> RegionRec rootlessHugeRoot = {{-32767, -32767, 32767, 32767}, NULL};
>
> diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/ 
> rootlessWindow.c
> index 72208cb..e4d936b 100644
> --- a/miext/rootless/rootlessWindow.c
> +++ b/miext/rootless/rootlessWindow.c
> @@ -51,15 +51,10 @@ extern Bool no_configure_window;
> #include "rootlessCommon.h"
> #include "rootlessWindow.h"
>
> -#ifdef ROOTLESS_GLOBAL_COORDS
> #define SCREEN_TO_GLOBAL_X \
>     (pScreen->x + rootlessGlobalOffsetX)
> #define SCREEN_TO_GLOBAL_Y \
>     (pScreen->y + rootlessGlobalOffsetY)
> -#else
> -#define SCREEN_TO_GLOBAL_X 0
> -#define SCREEN_TO_GLOBAL_Y 0
> -#endif
>
> #define DEFINE_ATOM_HELPER(func,atom_name)                      \
>   static Atom func (void) {                                       \
> -- 
> 1.7.0
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3333 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100714/869ecaab/attachment.bin>


More information about the xorg-devel mailing list