Made it so uiContainer on Windows only updates when we ask it to resize, not on every WM_WINDOWPOSCHANGED. More TODOs.
This commit is contained in:
parent
bcafe6806a
commit
41030b0a03
1
TODO.md
1
TODO.md
|
@ -50,3 +50,4 @@ notes to self
|
||||||
- note that the default action for uiWindowOnClosing() is to return 0 (keep the window open)
|
- note that the default action for uiWindowOnClosing() is to return 0 (keep the window open)
|
||||||
- note that uiInitOptions should be initialized to zero
|
- note that uiInitOptions should be initialized to zero
|
||||||
- explicitly document that uiCheckboxSetChecked() and uiEntrySetText() do not fire uiCheckboxOnToggled() and uiEntryOnChanged(), respectively
|
- explicitly document that uiCheckboxSetChecked() and uiEntrySetText() do not fire uiCheckboxOnToggled() and uiEntryOnChanged(), respectively
|
||||||
|
- note that uiControlResize() on a uiContainer also updates
|
||||||
|
|
|
@ -164,7 +164,6 @@ static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP
|
||||||
CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam;
|
CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam;
|
||||||
HWND control;
|
HWND control;
|
||||||
NMHDR *nm = (NMHDR *) lParam;
|
NMHDR *nm = (NMHDR *) lParam;
|
||||||
WINDOWPOS *wp = (WINDOWPOS *) lParam;
|
|
||||||
RECT r;
|
RECT r;
|
||||||
HDC dc;
|
HDC dc;
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT ps;
|
||||||
|
@ -231,10 +230,6 @@ static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP
|
||||||
// avoid some flicker
|
// avoid some flicker
|
||||||
// we draw the whole update area anyway
|
// we draw the whole update area anyway
|
||||||
return 1;
|
return 1;
|
||||||
case WM_WINDOWPOSCHANGED:
|
|
||||||
if ((wp->flags & SWP_NOSIZE) != 0)
|
|
||||||
break;
|
|
||||||
// fall through
|
|
||||||
case msgUpdateChild:
|
case msgUpdateChild:
|
||||||
if (cc == NULL)
|
if (cc == NULL)
|
||||||
break;
|
break;
|
||||||
|
@ -342,8 +337,6 @@ static void containerResize(uiControl *cc, intmax_t x, intmax_t y, intmax_t widt
|
||||||
|
|
||||||
moveAndReorderWindow(c->hwnd, d->Sys->InsertAfter, x, y, width, height);
|
moveAndReorderWindow(c->hwnd, d->Sys->InsertAfter, x, y, width, height);
|
||||||
d->Sys->InsertAfter = c->hwnd;
|
d->Sys->InsertAfter = c->hwnd;
|
||||||
// under some circumstances this might not be sufficient
|
|
||||||
// example: check the Spaced checkbox; inside boxes will have been resized already before they get a chance to update their padded
|
|
||||||
SendMessageW(c->hwnd, msgUpdateChild, 0, 0);
|
SendMessageW(c->hwnd, msgUpdateChild, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue