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:
Pietro Gagliardi 2015-05-10 12:56:06 -04:00
parent bcafe6806a
commit 41030b0a03
2 changed files with 1 additions and 7 deletions

View File

@ -50,3 +50,4 @@ notes to self
- note that the default action for uiWindowOnClosing() is to return 0 (keep the window open)
- note that uiInitOptions should be initialized to zero
- explicitly document that uiCheckboxSetChecked() and uiEntrySetText() do not fire uiCheckboxOnToggled() and uiEntryOnChanged(), respectively
- note that uiControlResize() on a uiContainer also updates

View File

@ -164,7 +164,6 @@ static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP
CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam;
HWND control;
NMHDR *nm = (NMHDR *) lParam;
WINDOWPOS *wp = (WINDOWPOS *) lParam;
RECT r;
HDC dc;
PAINTSTRUCT ps;
@ -231,10 +230,6 @@ static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP
// avoid some flicker
// we draw the whole update area anyway
return 1;
case WM_WINDOWPOSCHANGED:
if ((wp->flags & SWP_NOSIZE) != 0)
break;
// fall through
case msgUpdateChild:
if (cc == NULL)
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);
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);
}