diff options
author | rhatcher <[email protected]> | 2012-12-06 11:48:05 -0600 |
---|---|---|
committer | rhatcher <[email protected]> | 2012-12-06 11:48:05 -0600 |
commit | 603609c54139ccb1791b10bef5672f22f030d6a4 (patch) | |
tree | b0c68726a4e6ecf45e1623c7f275b382725c567c /src/newt/native | |
parent | 811e3791b98fea0dfa3b7d301cb532c54df8dc82 (diff) | |
parent | 7a6f6b7a5b028e918a843de9fe16c38da75edba9 (diff) |
Merge branch 'master' of https://github.com/sgothel/jogl
Diffstat (limited to 'src/newt/native')
-rw-r--r-- | src/newt/native/WindowsWindow.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c index e3d5cffa0..e7b454580 100644 --- a/src/newt/native/WindowsWindow.c +++ b/src/newt/native/WindowsWindow.c @@ -1034,23 +1034,22 @@ static LRESULT CALLBACK wndProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lP case WM_PAINT: { RECT r; useDefWindowProc = 0; - if (GetUpdateRect(wnd, &r, TRUE /* erase background */)) { - /* - jint width = r.right-r.left; - jint height = r.bottom-r.top; - if (width > 0 && height > 0) { - (*env)->CallVoidMethod(env, window, windowRepaintID, JNI_FALSE, r.left, r.top, width, height); - } - ValidateRect(wnd, &r); - */ + if (GetUpdateRect(wnd, &r, FALSE /* do not erase background */)) { + // clear the whole client area and issue repaint for it, w/o looping through erase background + ValidateRect(wnd, NULL); // clear all! + (*env)->CallVoidMethod(env, window, windowRepaintID, JNI_FALSE, 0, 0, -1, -1); + } else { + // shall not happen ? + ValidateRect(wnd, NULL); // clear all! } + // return 0 == done break; } case WM_ERASEBKGND: // ignore erase background (*env)->CallVoidMethod(env, window, windowRepaintID, JNI_FALSE, 0, 0, -1, -1); useDefWindowProc = 0; - res = 1; // OpenGL, etc .. erases the background, hence we claim to have just done this + res = 1; // return 1 == done, OpenGL, etc .. erases the background, hence we claim to have just done this break; |