Added check to ensure that TopLevel::screen never returns -1
svn path=/trunk/KDE/kdebase/workspace/; revision=888093
This commit is contained in:
parent
e6390ab42c
commit
12e9f1d2a9
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue