Decided to not call InvalidateRect() in the Windows updateParent(); the Cocoa one doesn't either, and besides, if controls expose something then the parent areas would be invalidated anyway :/ More TODO removal.

This commit is contained in:
Pietro Gagliardi 2015-04-08 21:08:53 -04:00
parent a2d785e22a
commit fa8389e98a
2 changed files with 1 additions and 10 deletions

View File

@ -89,18 +89,9 @@ void resize(uiControl *control, HWND parent, RECT r)
void updateParent(uintptr_t h) void updateParent(uintptr_t h)
{ {
HWND hwnd; HWND hwnd;
RECT r;
if (h == 0) // no parent if (h == 0) // no parent
return; return;
hwnd = (HWND) h; hwnd = (HWND) h;
/*TODO
// TODO is there a better way?
if (GetWindowRect(hwnd, &r) == 0)
logLastError("error getting window rect for dummy move in updateParent()");
if (MoveWindow(hwnd, r.left, r.top, r.right - r.left, r.bottom - r.top, TRUE) == 0)
logLastError("error moving window in updateParent()");
*/
SendMessageW(hwnd, msgUpdateChild, 0, 0); SendMessageW(hwnd, msgUpdateChild, 0, 0);
// TODO invalidate rect?
} }

View File

@ -33,7 +33,7 @@ enum {
// redirected WM_COMMAND and WM_NOTIFY // redirected WM_COMMAND and WM_NOTIFY
msgCOMMAND = WM_APP + 0x40, // start offset just to be safe msgCOMMAND = WM_APP + 0x40, // start offset just to be safe
msgNOTIFY, msgNOTIFY,
msgUpdateChild, // fake because wine (only? TODO) seems to SWP_NOSIZE MoveWindow()s and SetWindowPos()s that don't change the window size (even if SWP_NOSIZE isn't specified) msgUpdateChild, // fake because Windows seems to SWP_NOSIZE MoveWindow()s and SetWindowPos()s that don't change the window size (even if SWP_NOSIZE isn't specified)
}; };
// debug_windows.c // debug_windows.c