diff options
Diffstat (limited to 'new/container_windows.c')
| -rw-r--r-- | new/container_windows.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/new/container_windows.c b/new/container_windows.c index 2056653..20d7d8d 100644 --- a/new/container_windows.c +++ b/new/container_windows.c @@ -82,3 +82,19 @@ void resize(uiControl *control, HWND parent, RECT r) logLastError("error releasing DC in resize()"); (*(control->resize))(control, r.left, r.top, r.right - r.left, r.bottom - r.top, &d); } + +void updateParent(uintptr_t h) +{ + HWND hwnd; + RECT r; + + if (h == 0) // no parent + return; + hwnd = (HWND) h; + // 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()"); + // TODO invalidate rect? +} |
