Add a safety check to desktop grid for the case that you click on an area where there is no desktop.

That case needs some more improvement as it zooms to the black area and suddenly replaces the screen with the actual windows.
BUG: 219721

svn path=/trunk/KDE/kdebase/workspace/; revision=1065215
This commit is contained in:
Martin Gräßlin 2009-12-22 19:02:51 +00:00
parent 5f6a6cac67
commit 11d53b7b09

View file

@ -809,6 +809,8 @@ EffectWindow* DesktopGridEffect::windowAt( QPoint pos ) const
int desktop; int desktop;
pos = unscalePos( pos, &desktop ); pos = unscalePos( pos, &desktop );
if( desktop >= effects->numberOfDesktops() )
return NULL;
if( isUsingPresentWindows() ) if( isUsingPresentWindows() )
{ {
const int screen = effects->screenNumber( pos ); const int screen = effects->screenNumber( pos );