diff options
author | Marc Horowitz <marc@mit.edu> | 1989-11-13 19:54:10 +0000 |
---|---|---|
committer | Marc Horowitz <marc@mit.edu> | 1989-11-13 19:54:10 +0000 |
commit | 05bb0c93268b1cc3d18dcbb2757412197983f0a3 (patch) | |
tree | 6283f1dbd2bab17688daf7504c6ab83a46c5f162 /zwgc/xrevstack.c | |
parent | 0e01e707e2d0899b98a87625f03699940b32cf96 (diff) |
ICCCM reverse stacking implemented
(This is broken until the ICCCM mandates correct reporting of
ConfigureNotify events)
Diffstat (limited to 'zwgc/xrevstack.c')
-rw-r--r-- | zwgc/xrevstack.c | 56 |
1 files changed, 54 insertions, 2 deletions
diff --git a/zwgc/xrevstack.c b/zwgc/xrevstack.c index af42f53..a18f85c 100644 --- a/zwgc/xrevstack.c +++ b/zwgc/xrevstack.c @@ -16,9 +16,61 @@ static char rcsid_xrevstack_c[] = "$Id$"; #endif -#ifdef REVSTACK #include <zephyr/mit-copyright.h> +#define REVSTACK + +#ifdef REVSTACK +#include "X_gram.h" +#include <stdio.h> + +x_gram *bottom_gram = NULL; +int reverse_stack = 0; + +void add_to_bottom(gram) + x_gram *gram; +{ + if (bottom_gram) { + bottom_gram->below = gram; + gram->below = NULL; + gram->above = bottom_gram; + bottom_gram = gram; + } else { + gram->above = NULL; + gram->below = NULL; + bottom_gram = gram; + } +} + +void pull_to_top(gram) + x_gram *gram; +{} + +void push_to_bottom(gram) + x_gram *gram; +{} + +void delete_gram(gram) + x_gram *gram; +{ + if (gram == bottom_gram) { + if (gram->above) { + bottom_gram = gram->above; + bottom_gram->below = NULL; + } else { + bottom_gram = NULL; + } + } else { + if (gram->above) + gram->above->below = gram->below; + gram->below->above = gram->above; + } +} + +#endif + +#ifdef TRUEREVSTACK + #include "X_gram.h" #include "zwgc.h" #include <stdio.h> @@ -177,4 +229,4 @@ x_gram *gram; #endif } -#endif /* REVSTACK */ +#endif /* TRUEREVSTACK */ |