If the center of a window is offscreen treat it as if it was on the

active screen instead of the primary one.

svn path=/trunk/KDE/kdebase/workspace/; revision=925357
This commit is contained in:
Lucas Murray 2009-02-13 06:28:50 +00:00
parent beee5a8f85
commit 1802e56d9b

View file

@ -344,10 +344,9 @@ int Toplevel::screen() const
return 0;
int s = workspace()->screenNumber( geometry().center());
if( s < 0 )
{
kDebug(1212) << "Invalid screen: Center" << geometry().center() << ", screen" << s;
return 0;
}
// Center of the window is offscreen, just use the active one as if this window is the
// one with input focus then activeScreen() will return the screen it used to be on.
return workspace()->activeScreen();
return s;
}