mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed popup location clipping
This commit is contained in:
parent
d635b8e67f
commit
757464db3e
12 changed files with 21 additions and 13 deletions
|
@ -131,9 +131,14 @@ WinBFWindow::WinBFWindow(BFWindow* parent, const StringImpl& title, int x, int y
|
|||
RECT desktopRect;
|
||||
::SystemParametersInfo(SPI_GETWORKAREA, NULL, &desktopRect, NULL);
|
||||
|
||||
if (x + width >= desktopRect.right)
|
||||
if (x < desktopRect.left)
|
||||
x = desktopRect.left;
|
||||
else if (x + width >= desktopRect.right)
|
||||
x = BF_MAX((int)desktopRect.left, desktopRect.right - width);
|
||||
if (y + height >= desktopRect.bottom)
|
||||
|
||||
if (y < desktopRect.top)
|
||||
y = desktopRect.top;
|
||||
else if (y + height >= desktopRect.bottom)
|
||||
y = BF_MAX((int)desktopRect.top, desktopRect.bottom - height);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue