From cb7c5d7c87cb74e32a8dba080d4adae1ec90cde7 Mon Sep 17 00:00:00 2001 From: Yann Droneaud Date: Wed, 4 Nov 2009 12:33:06 +0100 Subject: [PATCH] Use a prefix for enum type _policy and _relation like other enums in xrandr.c Cc: Yann Droneaud --- xrandr.c | 35 ++++++++++++++++++++--------------- 1 files changed, 20 insertions(+), 15 deletions(-) diff --git a/xrandr.c b/xrandr.c index f7eba11..bab0217 100644 --- a/xrandr.c +++ b/xrandr.c @@ -211,11 +211,16 @@ reflection_name (Rotation rotation) #if HAS_RANDR_1_2 typedef enum _policy { - clone, extend + policy_clone, + policy_extend } policy_t; typedef enum _relation { - left_of, right_of, above, below, same_as, + relation_left_of, + relation_right_of, + relation_above, + relation_below, + relation_same_as, } relation_t; typedef struct { @@ -1769,23 +1774,23 @@ set_positions (void) } switch (output->relation) { - case left_of: + case relation_left_of: output->y = relation->y; output->x = relation->x - mode_width (output->mode_info, output->rotation); break; - case right_of: + case relation_right_of: output->y = relation->y; output->x = relation->x + mode_width (relation->mode_info, relation->rotation); break; - case above: + case relation_above: output->x = relation->x; output->y = relation->y - mode_height (output->mode_info, output->rotation); break; - case below: + case relation_below: output->x = relation->x; output->y = relation->y + mode_height (relation->mode_info, relation->rotation); break; - case same_as: + case relation_same_as: output->x = relation->x; output->y = relation->y; } @@ -2062,7 +2067,7 @@ main (int argc, char **argv) int ret = 0; #if HAS_RANDR_1_2 output_t *output = NULL; - policy_t policy = clone; + policy_t policy = policy_clone; Bool setit_1_2 = False; Bool query_1_2 = False; Bool modeit = False; @@ -2253,7 +2258,7 @@ main (int argc, char **argv) if (!strcmp ("--left-of", argv[i])) { if (++i>=argc) usage (); if (!output) usage(); - output->relation = left_of; + output->relation = relation_left_of; output->relative_to = argv[i]; output->changes |= changes_relation; continue; @@ -2261,7 +2266,7 @@ main (int argc, char **argv) if (!strcmp ("--right-of", argv[i])) { if (++i>=argc) usage (); if (!output) usage(); - output->relation = right_of; + output->relation = relation_right_of; output->relative_to = argv[i]; output->changes |= changes_relation; continue; @@ -2269,7 +2274,7 @@ main (int argc, char **argv) if (!strcmp ("--above", argv[i])) { if (++i>=argc) usage (); if (!output) usage(); - output->relation = above; + output->relation = relation_above; output->relative_to = argv[i]; output->changes |= changes_relation; continue; @@ -2277,7 +2282,7 @@ main (int argc, char **argv) if (!strcmp ("--below", argv[i])) { if (++i>=argc) usage (); if (!output) usage(); - output->relation = below; + output->relation = relation_below; output->relative_to = argv[i]; output->changes |= changes_relation; continue; @@ -2285,7 +2290,7 @@ main (int argc, char **argv) if (!strcmp ("--same-as", argv[i])) { if (++i>=argc) usage (); if (!output) usage(); - output->relation = same_as; + output->relation = relation_same_as; output->relative_to = argv[i]; output->changes |= changes_relation; continue; @@ -2437,12 +2442,12 @@ main (int argc, char **argv) continue; } if (!strcmp ("--clone", argv[i])) { - policy = clone; + policy = policy_clone; setit_1_2 = True; continue; } if (!strcmp ("--extend", argv[i])) { - policy = extend; + policy = policy_extend; setit_1_2 = True; continue; } -- 1.6.0.2