Merge pull request #3832 from love-code-yeyixiao/master

Fix
This commit is contained in:
DavidXanatos 2024-04-20 10:11:44 +02:00 committed by GitHub
commit 97cced99b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 6 deletions

View File

@ -1959,9 +1959,15 @@ _FX BOOL Gui_MoveWindow(
RECT rt;
SystemParametersInfoA(SPI_GETWORKAREA, 0, &rt, 0);
int y1 = GetSystemMetrics(SM_CYSCREEN) - rt.bottom;
int y1 = GetSystemMetrics(SM_CYSCREEN) - rt.bottom, x1 = GetSystemMetrics(SM_CXSCREEN) - rt.right, y2 = GetSystemMetrics(SM_CYSCREEN) - rt.top, x2 = GetSystemMetrics(SM_CXSCREEN) - rt.left;
if (y + h > y1)
h = y1 - y - 2;
if (y < y2)
y = y2 + 2;
if (x + w > x1)
w = x1 - x;
if (x < x2)
x = x2 + 2;
}
}
@ -2005,9 +2011,15 @@ _FX BOOL Gui_SetWindowPos(
RECT rt;
SystemParametersInfoA(SPI_GETWORKAREA, 0, &rt, 0);
int y1 = GetSystemMetrics(SM_CYSCREEN) - rt.bottom;
int y1 = GetSystemMetrics(SM_CYSCREEN) - rt.bottom, x1 = GetSystemMetrics(SM_CXSCREEN) - rt.right, y2 = GetSystemMetrics(SM_CYSCREEN) - rt.top, x2 = GetSystemMetrics(SM_CXSCREEN) - rt.left;
if (y + h > y1)
h = y1 - y - 2;
if (y < y2)
y = y2 + 2;
if (x + w > x1)
w = x1 - x;
if (x < x2)
x = x2 + 2;
}
}