|
@@ -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);
|
|
|
}
|
|
|
|