improved the window broder on windows 8

This commit is contained in:
fourtf 2018-05-23 17:24:07 +02:00
parent 0475ea0b6f
commit 8173b3d60d

View file

@ -302,10 +302,18 @@ bool BaseWindow::nativeEvent(const QByteArray &eventType, void *message, long *r
NCCALCSIZE_PARAMS *ncp = (reinterpret_cast<NCCALCSIZE_PARAMS *>(msg->lParam)); NCCALCSIZE_PARAMS *ncp = (reinterpret_cast<NCCALCSIZE_PARAMS *>(msg->lParam));
ncp->lppos->flags |= SWP_NOREDRAW; ncp->lppos->flags |= SWP_NOREDRAW;
RECT *clientRect = &ncp->rgrc[0]; RECT *clientRect = &ncp->rgrc[0];
if (IsWindows10OrGreater()) {
clientRect->left += cx; clientRect->left += cx;
clientRect->top += 0; clientRect->top += 0;
clientRect->right -= cx; clientRect->right -= cx;
clientRect->bottom -= cy; clientRect->bottom -= cy;
} else {
clientRect->left += 1;
clientRect->top += 0;
clientRect->right -= 1;
clientRect->bottom -= 1;
}
} }
*result = 0; *result = 0;