backport 1214238, VD constrainment
CCBUG: 261665 svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1214242
This commit is contained in:
parent
6bfeef78a6
commit
1d9d989735
1 changed files with 4 additions and 1 deletions
|
@ -79,6 +79,7 @@ namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
extern int screen_number;
|
extern int screen_number;
|
||||||
|
static const int KWIN_MAX_NUMBER_DESKTOPS = 20;
|
||||||
|
|
||||||
Workspace* Workspace::_self = 0;
|
Workspace* Workspace::_self = 0;
|
||||||
|
|
||||||
|
@ -1729,7 +1730,9 @@ void Workspace::previousDesktop()
|
||||||
*/
|
*/
|
||||||
void Workspace::setNumberOfDesktops( int n )
|
void Workspace::setNumberOfDesktops( int n )
|
||||||
{
|
{
|
||||||
if( n == numberOfDesktops() )
|
if ( n > KWIN_MAX_NUMBER_DESKTOPS )
|
||||||
|
n = KWIN_MAX_NUMBER_DESKTOPS;
|
||||||
|
if( n < 1 || n == numberOfDesktops() )
|
||||||
return;
|
return;
|
||||||
int old_number_of_desktops = numberOfDesktops();
|
int old_number_of_desktops = numberOfDesktops();
|
||||||
desktopCount_ = n;
|
desktopCount_ = n;
|
||||||
|
|
Loading…
Reference in a new issue