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/container_windows.c | |
| parent | 7b104667ab49b62e19f115fd33274936e087d892 (diff) | |
Fixed initial (and future) window redraw issues on Windows.
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? +} |
