oops, added group, and tried a sync() in destructor, but since we have

no proper logout...
Anyway, nice to have 6 desktops again :)

svn path=/trunk/kdebase/kwin/; revision=35756
This commit is contained in:
David Faure 1999-12-03 19:04:03 +00:00
parent 0274e04914
commit 410a80a76d

View file

@ -156,8 +156,9 @@ void Workspace::init()
desk_popup = 0; desk_popup = 0;
popup_client = 0; popup_client = 0;
KConfig* config = KGlobal::config(); KConfig* config = KGlobal::config();
config->setGroup("Desktops");
if (!config->hasKey("NumberOfDesktops")) if (!config->hasKey("NumberOfDesktops"))
config->writeEntry("NumberOfDesktops", 4); config->writeEntry("NumberOfDesktops", 4);
int number_of_desktops = config->readNumEntry("NumberOfDesktops"); int number_of_desktops = config->readNumEntry("NumberOfDesktops");
setNumberOfDesktops( number_of_desktops ); setNumberOfDesktops( number_of_desktops );
setCurrentDesktop( 1 ); setCurrentDesktop( 1 );
@ -225,6 +226,7 @@ Workspace::~Workspace()
delete keys; delete keys;
if ( root == qt_xrootwin() ) if ( root == qt_xrootwin() )
XDeleteProperty(qt_xdisplay(), qt_xrootwin(), atoms->kwm_running); XDeleteProperty(qt_xdisplay(), qt_xrootwin(), atoms->kwm_running);
KGlobal::config()->sync();
} }