From 06c2bb7c25a1612e8e98bdded498ecca4be359d0 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 8 Apr 2015 18:04:46 -0400 Subject: Fixed initial (and future) window redraw issues on Windows. --- new/stack.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'new/stack.c') diff --git a/new/stack.c b/new/stack.c index 45fcf54..fa28e59 100644 --- a/new/stack.c +++ b/new/stack.c @@ -38,11 +38,16 @@ static uintptr_t stackHandle(uiControl *c) static void stackSetParent(uiControl *c, uintptr_t parent) { + stack *s = S(c); uintmax_t i; + uintptr_t oldparent; - S(c)->parent = parent; + oldparent = s->parent; + s->parent = parent; for (i = 0; i < S(c)->len; i++) - (*(S(c)->controls[i]->setParent))(S(c)->controls[i], S(c)->parent); + (*(s->controls[i]->setParent))(s->controls[i], s->parent); + updateParent(oldparent); + updateParent(s->parent); } static uiSize stackPreferredSize(uiControl *c, uiSizing *d) @@ -213,5 +218,5 @@ void uiStackAdd(uiControl *st, uiControl *c, int stretchy) if (s->parent != 0) (*(s->controls[s->len]->setParent))(s->controls[s->len], s->parent); s->len++; - // TODO queue reposition + updateParent(s->parent); } -- cgit v1.2.3