JBR-1786 Weird white border for IDE window

(cherry picked from commit 4b09614a0e)
This commit is contained in:
Anton Tarasov
2019-08-26 16:51:59 +03:00
committed by alexey.ushakov@jetbrains.com
parent c3d1eacb9a
commit dc65ceaa01

View File

@@ -30,6 +30,7 @@
#include "awt_IconCursor.h"
#include "awt_Win32GraphicsDevice.h"
#include "ComCtl32Util.h"
#include "shellapi.h"
#include <windowsx.h>
#include <uxtheme.h>
@@ -1788,7 +1789,15 @@ MsgRouting AwtFrame::WmNcCalcSize(BOOL wParam, LPNCCALCSIZE_PARAMS lpncsp, LRESU
// [moklev] Workaround for RIDER-27069, IDEA-211327
if (!this->IsUndecorated()) {
rect->right += this->ScaleUpX(1);
rect->bottom -= 1;
// [tav] Decrement NC bottom only when taskbar is bottom/autohide (JBR-1786)
APPBARDATA abData;
abData.cbSize = sizeof(abData);
if (::SHAppBarMessage(ABM_GETTASKBARPOS, &abData) &&
abData.uEdge == ABE_BOTTOM &&
::SHAppBarMessage(ABM_GETSTATE, &abData) == ABS_AUTOHIDE)
{
rect->bottom -= 1;
}
}
}
else {