From b37468c3b877ca1dfc2a1dccbaa9c6995f8b54dc Mon Sep 17 00:00:00 2001 From: Lucas Murray Date: Wed, 19 Nov 2008 09:08:47 +0000 Subject: [PATCH] Prevent crash when forcing a window onto a non-existant desktop. Can't work out why it doesn't move the window back onto the correct desktop once it's restored though. BUG: 136949 svn path=/trunk/KDE/kdebase/workspace/; revision=886439 --- client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.cpp b/client.cpp index a4c664adfe..e94234b1d5 100644 --- a/client.cpp +++ b/client.cpp @@ -1209,7 +1209,7 @@ void Client::setDesktop( int desktop ) { if( desktop != NET::OnAllDesktops ) // do range check desktop = qMax( 1, qMin( workspace()->numberOfDesktops(), desktop )); - desktop = rules()->checkDesktop( desktop ); + desktop = qMax( 1, qMin( workspace()->numberOfDesktops(), rules()->checkDesktop( desktop ))); if( desk == desktop ) return; int was_desk = desk;