mirror of https://github.com/buggins/dlangui.git
don't resize window if app is minimized - to fix dlangide#181
This commit is contained in:
parent
6b2b324e78
commit
e9636ea5f1
|
@ -1309,15 +1309,14 @@ LRESULT WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
WINDOWPOS * pos = cast(WINDOWPOS*)lParam;
|
WINDOWPOS * pos = cast(WINDOWPOS*)lParam;
|
||||||
Log.d("WM_WINDOWPOSCHANGED: ", *pos);
|
Log.d("WM_WINDOWPOSCHANGED: ", *pos);
|
||||||
GetClientRect(hwnd, &rect);
|
GetClientRect(hwnd, &rect);
|
||||||
//window.onResize(pos.cx, pos.cy);
|
if (pos.x > -30000) {// to ignore minimized state
|
||||||
//if (!(pos.flags & 0x8000)) { //SWP_NOACTIVATE)) {
|
|
||||||
//if (pos.x > -30000) {
|
|
||||||
int dx = rect.right - rect.left;
|
int dx = rect.right - rect.left;
|
||||||
int dy = rect.bottom - rect.top;
|
int dy = rect.bottom - rect.top;
|
||||||
|
if (window.width != dx || window.height != dy) {
|
||||||
window.onResize(dx, dy);
|
window.onResize(dx, dy);
|
||||||
InvalidateRect(hwnd, null, FALSE);
|
InvalidateRect(hwnd, null, FALSE);
|
||||||
//}
|
}
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue