mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fix error tooltip position on multi-screen systems
This commit is contained in:
parent
51a01cc212
commit
7c4c9e6ce9
1 changed files with 13 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue