Fix white border appearing around maximized window (#4190)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com> fixes https://github.com/Chatterino/chatterino2/issues/2205
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
- Bugfix: Fixed messages where Right-to-Left order is mixed in multiple lines. (#4173)
|
- Bugfix: Fixed messages where Right-to-Left order is mixed in multiple lines. (#4173)
|
||||||
- Bugfix: Fixed the wrong right-click menu showing in the chat input box. (#4177)
|
- Bugfix: Fixed the wrong right-click menu showing in the chat input box. (#4177)
|
||||||
- Bugfix: Fixed popup windows not appearing/minimizing correctly on the Windows taskbar. (#4181)
|
- Bugfix: Fixed popup windows not appearing/minimizing correctly on the Windows taskbar. (#4181)
|
||||||
|
- Bugfix: Fixed white border appearing around maximized window on Windows. (#4190)
|
||||||
|
|
||||||
## 2.4.0-beta
|
## 2.4.0-beta
|
||||||
|
|
||||||
|
|||||||
+10
-11
@@ -793,8 +793,9 @@ bool BaseWindow::handleSHOWWINDOW(MSG *msg)
|
|||||||
{
|
{
|
||||||
this->shown_ = true;
|
this->shown_ = true;
|
||||||
|
|
||||||
const MARGINS shadow = {8, 8, 8, 8};
|
// disable OS window border
|
||||||
DwmExtendFrameIntoClientArea(HWND(this->winId()), &shadow);
|
const MARGINS margins = {-1};
|
||||||
|
DwmExtendFrameIntoClientArea(HWND(this->winId()), &margins);
|
||||||
}
|
}
|
||||||
if (!this->initalBounds_.isNull())
|
if (!this->initalBounds_.isNull())
|
||||||
{
|
{
|
||||||
@@ -819,17 +820,15 @@ bool BaseWindow::handleNCCALCSIZE(MSG *msg, long *result)
|
|||||||
#ifdef USEWINSDK
|
#ifdef USEWINSDK
|
||||||
if (this->hasCustomWindowFrame())
|
if (this->hasCustomWindowFrame())
|
||||||
{
|
{
|
||||||
// int cx = GetSystemMetrics(SM_CXSIZEFRAME);
|
|
||||||
// int cy = GetSystemMetrics(SM_CYSIZEFRAME);
|
|
||||||
|
|
||||||
if (msg->wParam == TRUE)
|
if (msg->wParam == TRUE)
|
||||||
{
|
{
|
||||||
NCCALCSIZE_PARAMS *ncp =
|
// remove 1 extra pixel on top of custom frame
|
||||||
(reinterpret_cast<NCCALCSIZE_PARAMS *>(msg->lParam));
|
auto *ncp = reinterpret_cast<NCCALCSIZE_PARAMS *>(msg->lParam);
|
||||||
ncp->lppos->flags |= SWP_NOREDRAW;
|
if (ncp)
|
||||||
RECT *clientRect = &ncp->rgrc[0];
|
{
|
||||||
|
ncp->lppos->flags |= SWP_NOREDRAW;
|
||||||
clientRect->top -= 1;
|
ncp->rgrc[0].top -= 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*result = 0;
|
*result = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user