From 92f1933e8205d99a54d9b0386e6b3dc86b1bdff4 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 16 May 2015 20:06:03 -0400 Subject: [PATCH] Some windows/resize.c work and TODOs. --- redo/windows/resize.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/redo/windows/resize.c b/redo/windows/resize.c index 26a65a81..887f8252 100644 --- a/redo/windows/resize.c +++ b/redo/windows/resize.c @@ -17,10 +17,20 @@ void uninitResizes(void) void queueResize(uiControl *c) { - // TODO make this more robust + uintmax_t i; + uiControl *d; + + // make sure we're only queued once + for (i = 0 ; i < resizes->len; i++) { + d = ptrArrayIndex(resizes, uiControl *, i); + if (c == d) + return; + } ptrArrayAppend(resizes, c); } +// TODO dequeueResize + void doResizes(void) { uiControl *c, *parent;