mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
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:
parent
fe2a9ccbff
commit
f2b35fb7dc
|
@ -8,6 +8,7 @@
|
|||
- 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 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
|
||||
|
||||
|
|
|
@ -793,8 +793,9 @@ bool BaseWindow::handleSHOWWINDOW(MSG *msg)
|
|||
{
|
||||
this->shown_ = true;
|
||||
|
||||
const MARGINS shadow = {8, 8, 8, 8};
|
||||
DwmExtendFrameIntoClientArea(HWND(this->winId()), &shadow);
|
||||
// disable OS window border
|
||||
const MARGINS margins = {-1};
|
||||
DwmExtendFrameIntoClientArea(HWND(this->winId()), &margins);
|
||||
}
|
||||
if (!this->initalBounds_.isNull())
|
||||
{
|
||||
|
@ -819,17 +820,15 @@ bool BaseWindow::handleNCCALCSIZE(MSG *msg, long *result)
|
|||
#ifdef USEWINSDK
|
||||
if (this->hasCustomWindowFrame())
|
||||
{
|
||||
// int cx = GetSystemMetrics(SM_CXSIZEFRAME);
|
||||
// int cy = GetSystemMetrics(SM_CYSIZEFRAME);
|
||||
|
||||
if (msg->wParam == TRUE)
|
||||
{
|
||||
NCCALCSIZE_PARAMS *ncp =
|
||||
(reinterpret_cast<NCCALCSIZE_PARAMS *>(msg->lParam));
|
||||
// remove 1 extra pixel on top of custom frame
|
||||
auto *ncp = reinterpret_cast<NCCALCSIZE_PARAMS *>(msg->lParam);
|
||||
if (ncp)
|
||||
{
|
||||
ncp->lppos->flags |= SWP_NOREDRAW;
|
||||
RECT *clientRect = &ncp->rgrc[0];
|
||||
|
||||
clientRect->top -= 1;
|
||||
ncp->rgrc[0].top -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
*result = 0;
|
||||
|
|
Loading…
Reference in a new issue