don't resize window if app is minimized - to fix dlangide#181

This commit is contained in:
Vadim Lopatin 2016-10-13 14:45:00 +03:00
parent 6b2b324e78
commit e9636ea5f1
1 changed files with 6 additions and 7 deletions

View File

@ -1309,15 +1309,14 @@ LRESULT WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
WINDOWPOS * pos = cast(WINDOWPOS*)lParam;
Log.d("WM_WINDOWPOSCHANGED: ", *pos);
GetClientRect(hwnd, &rect);
//window.onResize(pos.cx, pos.cy);
//if (!(pos.flags & 0x8000)) { //SWP_NOACTIVATE)) {
//if (pos.x > -30000) {
if (pos.x > -30000) {// to ignore minimized state
int dx = rect.right - rect.left;
int dy = rect.bottom - rect.top;
window.onResize(dx, dy);
InvalidateRect(hwnd, null, FALSE);
//}
//}
if (window.width != dx || window.height != dy) {
window.onResize(dx, dy);
InvalidateRect(hwnd, null, FALSE);
}
}
}
}
return 0;