offscreen warnings given only for top-level windows, which is all we care about, if anything. bug 53621. r=lumpy. i swear.

This commit is contained in:
danm%netscape.com 2000-12-01 23:34:43 +00:00
Родитель f45e789702
Коммит 5ff0eefc43
1 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -2471,12 +2471,15 @@ NS_IMETHODIMP nsWindow::Move(PRInt32 aX, PRInt32 aY)
if (mIsToplevel && mShell)
{
#ifdef DEBUG
// complain if a window is moved offscreen (legal, but potentially worrisome)
PRInt32 screenWidth = gdk_screen_width();
PRInt32 screenHeight = gdk_screen_height();
// no annoying assertions. just mention the issue.
if (aX < 0 || aX >= screenWidth || aY < 0 || aY >= screenHeight)
printf("window moved to offscreen position\n");
/* complain if a top-level window is moved offscreen
(legal, but potentially worrisome) */
if (!mParent) {
PRInt32 screenWidth = gdk_screen_width();
PRInt32 screenHeight = gdk_screen_height();
// no annoying assertions. just mention the issue.
if (aX < 0 || aX >= screenWidth || aY < 0 || aY >= screenHeight)
printf("window moved to offscreen position\n");
}
#endif
// do it the way it should be done period.