diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-08 18:04:46 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-08 18:04:46 -0400 |
| commit | 06c2bb7c25a1612e8e98bdded498ecca4be359d0 (patch) | |
| tree | d5dea8278e43edc1308753bed4e0db52850defc1 /new/stack.c | |
| parent | 7b104667ab49b62e19f115fd33274936e087d892 (diff) | |
Fixed initial (and future) window redraw issues on Windows.
Diffstat (limited to 'new/stack.c')
| -rw-r--r-- | new/stack.c | 11 |
1 files changed, 8 insertions, 3 deletions
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); } |
