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
This commit is contained in:
Lucas Murray 2008-11-19 09:08:47 +00:00
parent 3a57e33bf6
commit b37468c3b8

View file

@ -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;