From 11d53b7b0912c0b124ae9b56dcd0a705222bcb4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 22 Dec 2009 19:02:51 +0000 Subject: [PATCH] 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 --- effects/desktopgrid/desktopgrid.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index 062e215192..8d94852de6 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -809,6 +809,8 @@ EffectWindow* DesktopGridEffect::windowAt( QPoint pos ) const int desktop; pos = unscalePos( pos, &desktop ); + if( desktop >= effects->numberOfDesktops() ) + return NULL; if( isUsingPresentWindows() ) { const int screen = effects->screenNumber( pos );