Added check to ensure that TopLevel::screen never returns -1

svn path=/trunk/KDE/kdebase/workspace/; revision=888093
This commit is contained in:
Guillaume Pothier 2008-11-23 19:13:23 +00:00
parent e6390ab42c
commit 12e9f1d2a9

View file

@ -342,7 +342,13 @@ int Toplevel::screen() const
{
if( !options->xineramaEnabled )
return 0;
return workspace()->screenNumber( geometry().center());
int s = workspace()->screenNumber( geometry().center());
if( s < 0 )
{
kDebug() << "center" << geometry().center() << "screen" << s;
return 0;
}
return s;
}
bool Toplevel::isOnScreen( int screen ) const