diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-17 19:03:47 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-17 19:03:47 +0000 |
commit | 9105cd947989db96a61c83493c44a336bf10a18c (patch) | |
tree | 44e736a163ffea3bde0a475734960c28233b9b1a /do_windows.c | |
parent | 76312369bde4267f6405a4e1d26697258cc06b32 (diff) |
merge XFree86 4.3.0.1 to -CURRENT
Diffstat (limited to 'do_windows.c')
-rw-r--r-- | do_windows.c | 114 |
1 files changed, 54 insertions, 60 deletions
diff --git a/do_windows.c b/do_windows.c index c6b386d..954d1e6 100644 --- a/do_windows.c +++ b/do_windows.c @@ -21,6 +21,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************************/ +/* $XFree86: xc/programs/x11perf/do_windows.c,v 1.5 2001/01/17 23:45:12 dawes Exp $ */ #include "x11perf.h" @@ -31,9 +32,8 @@ static int parentrows, parentcolumns, parentwindows; static int parentwidth, parentheight; static Window popup; -void ComputeSizes(xp, p) - XParms xp; - Parms p; +static void +ComputeSizes(XParms xp, Parms p) { childwindows = p->objects; childrows = (childwindows + MAXCOLS - 1) / MAXCOLS; @@ -43,10 +43,8 @@ void ComputeSizes(xp, p) parentheight = (CHILDSIZE+CHILDSPACE) * childrows; } -int CreateParents(xp, p, reps) - XParms xp; - Parms p; - int reps; +int +CreateParents(XParms xp, Parms p, int reps) { int i; @@ -87,10 +85,18 @@ int CreateParents(xp, p, reps) } /* CreateParents */ -void MapParents(xp, p, reps) - XParms xp; - Parms p; - int reps; +void +MapParents(XParms xp, Parms p, int reps) +{ + int i; + + for (i = 0; i != parentwindows; i++) { + XMapWindow(xp->d, parents[i]); + } +} + +void +MapParentsCleanup(XParms xp, Parms p) { int i; @@ -100,20 +106,16 @@ void MapParents(xp, p, reps) } -int InitCreate(xp, p, reps) - XParms xp; - Parms p; - int reps; +int +InitCreate(XParms xp, Parms p, int reps) { reps = CreateParents(xp, p, reps); MapParents(xp, p, reps); return reps; } -void CreateChildGroup(xp, p, parent) - XParms xp; - Parms p; - Window parent; +static void +CreateChildGroup(XParms xp, Parms p, Window parent) { int j; @@ -128,10 +130,8 @@ void CreateChildGroup(xp, p, parent) XMapSubwindows (xp->d, parent); } -void CreateChildren(xp, p, reps) - XParms xp; - Parms p; - int reps; +void +CreateChildren(XParms xp, Parms p, int reps) { int i; @@ -140,10 +140,8 @@ void CreateChildren(xp, p, reps) } /* end i */ } -void DestroyChildren(xp, p, reps) - XParms xp; - Parms p; - int reps; +void +DestroyChildren(XParms xp, Parms p) { int i; @@ -152,9 +150,8 @@ void DestroyChildren(xp, p, reps) } } -void EndCreate(xp, p) - XParms xp; - Parms p; +void +EndCreate(XParms xp, Parms p) { XDestroySubwindows(xp->d, xp->w); free(parents); @@ -162,20 +159,26 @@ void EndCreate(xp, p) } -int InitMap(xp, p, reps) - XParms xp; - Parms p; - int reps; +int +InitMap(XParms xp, Parms p, int reps) { reps = CreateParents(xp, p, reps); CreateChildren(xp, p, reps); return reps; } -void UnmapParents(xp, p, reps) - XParms xp; - Parms p; - int reps; +void +UnmapParents(XParms xp, Parms p, int reps) +{ + int i; + + for (i = 0; i != parentwindows; i++) { + XUnmapWindow(xp->d, parents[i]); + } +} + +void +UnmapParentsCleanup(XParms xp, Parms p) { int i; @@ -184,10 +187,8 @@ void UnmapParents(xp, p, reps) } } -int InitDestroy(xp, p, reps) - XParms xp; - Parms p; - int reps; +int +InitDestroy(XParms xp, Parms p, int reps) { reps = CreateParents(xp, p, reps); CreateChildren(xp, p, reps); @@ -195,10 +196,8 @@ int InitDestroy(xp, p, reps) return reps; } -void DestroyParents(xp, p, reps) - XParms xp; - Parms p; - int reps; +void +DestroyParents(XParms xp, Parms p, int reps) { int i; @@ -208,9 +207,8 @@ void DestroyParents(xp, p, reps) } -void RenewParents(xp, p) - XParms xp; - Parms p; +void +RenewParents(XParms xp, Parms p) { int i; @@ -222,10 +220,8 @@ void RenewParents(xp, p) MapParents(xp, p, parentwindows); } -int InitPopups(xp, p, reps) - XParms xp; - Parms p; - int reps; +int +InitPopups(XParms xp, Parms p, int reps) { #ifdef CHILDROOT XWindowAttributes xwa; @@ -265,21 +261,19 @@ int InitPopups(xp, p, reps) return reps; } -void DoPopUps(xp, p, reps) - XParms xp; - Parms p; - int reps; +void +DoPopUps(XParms xp, Parms p, int reps) { int i; for (i = 0; i != reps; i++) { XMapWindow(xp->d, popup); XUnmapWindow(xp->d, popup); + CheckAbort (); } } -void EndPopups(xp, p) - XParms xp; - Parms p; +void +EndPopups(XParms xp, Parms p) { XDestroySubwindows(xp->d, xp->w); #ifdef CHILDROOT |