diff options
author | Dave Airlie <airlied@redhat.com> | 2011-03-09 14:53:26 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-03-10 11:00:48 +1000 |
commit | 5a94934487ea477947e24dcd4720b7cde77d3d2f (patch) | |
tree | ebf3bd55094670139ebf2dbf0ef4129ab361a05b /Xext/panoramiX.h | |
parent | c48c530e541e201ea1afe2512d85967659ceef84 (diff) |
panoramiX: consolidate common id assignment code.
This adds a new FOR_NSCREENS_FORWARD_SKIP, which skips the first
element and is a common idiom throughout panoramiX code.
It then adds a new inline function to hide id assignment to a
panoramiX resource and cleans up lots of common repeated code.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'Xext/panoramiX.h')
-rw-r--r-- | Xext/panoramiX.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Xext/panoramiX.h b/Xext/panoramiX.h index e4938f5bd..71651e558 100644 --- a/Xext/panoramiX.h +++ b/Xext/panoramiX.h @@ -44,7 +44,7 @@ Equipment Corporation. #include <X11/extensions/panoramiXproto.h> #undef _PANORAMIX_SERVER #include "gcstruct.h" - +#include "dixstruct.h" typedef struct _PanoramiXInfo { XID id ; @@ -70,6 +70,7 @@ typedef struct { } PanoramiXRes; #define FOR_NSCREENS_FORWARD(j) for(j = 0; j < PanoramiXNumScreens; j++) +#define FOR_NSCREENS_FORWARD_SKIP(j) for(j = 1; j < PanoramiXNumScreens; j++) #define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--) #define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j) |