1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-20 17:08:00 +02:00

Merge pull request #114 from mandrelavoie/Fix-error-tooltip-position-on-multi-display-systems

Fix error tooltip position on multi-screen systems
This commit is contained in:
Brian Fiete 2020-04-09 05:47:12 -07:00 committed by GitHub
commit e0af0e6762
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1131,7 +1131,19 @@ void WinBFApp::GetDesktopResolution(int& width, int& height)
void WinBFApp::GetWorkspaceRect(int& x, int& y, int& width, int& height)
{
RECT desktopRect;
::SystemParametersInfo(SPI_GETWORKAREA, NULL, &desktopRect, NULL);
if (::GetSystemMetrics(SM_CMONITORS) > 1)
{
desktopRect.left = ::GetSystemMetrics(SM_XVIRTUALSCREEN);
desktopRect.right = ::GetSystemMetrics(SM_CXVIRTUALSCREEN);
desktopRect.top = ::GetSystemMetrics(SM_YVIRTUALSCREEN);
desktopRect.bottom = ::GetSystemMetrics(SM_CYVIRTUALSCREEN);
}
else
{
::SystemParametersInfo(SPI_GETWORKAREA, NULL, &desktopRect, NULL);
}
x = desktopRect.left;
y = desktopRect.top;
width = desktopRect.right - desktopRect.left;