On Sat, 20 Apr 2013, Carlos R. Mafra escribió:

> On Sat, 20 Apr 2013 at 14:04:59 +0200, Rodolfo García Peñas (kix) wrote:
> > From: "Rodolfo García Peñas (kix)" <k...@kix.es>
> > 
> > When the screen is created, it creates the initial
> > workspace. This workspace could not be created, because
> > is not used. The workspaces are created later, so we can
> > avoid to create this initial workspace here.
> > 
> > This is good because this initial workspace creates an extra
> > clip, that is not needed too.
> > 
> 
> 
> 
> > The problem is that the wWorkspaceMenuUpdate() function doesn't
> > check if the workspace exists when the menu is assigned, therefore
> > we must check first if the current workspace exists, and then
> > assign the menu:
> 
> 
> I suggest that you split this patch into two. The first should add
> the check for scr->current_workspace and the other remove the wWorkspace()
> call.

Ok.
 
> 
> >  src/screen.c    |    3 ---
> >  src/workspace.c |    7 +++++--
> >  2 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/src/screen.c b/src/screen.c
> > index 37e4da3..920b7e6 100644
> > --- a/src/screen.c
> > +++ b/src/screen.c
> > @@ -662,9 +662,6 @@ WScreen *wScreenInit(int screen_number)
> >  
> >     wNETWMInitStuff(scr);
> >  
> > -   /* create initial workspace */
> > -   wWorkspaceNew(scr);
> > -
> >     /* create shared pixmaps */
> >     createPixmaps(scr);
> >  
> > diff --git a/src/workspace.c b/src/workspace.c
> > index b4cccd0..9eaeb15 100644
> > --- a/src/workspace.c
> > +++ b/src/workspace.c
> > @@ -784,8 +784,11 @@ void wWorkspaceMenuUpdate(WScreen * scr, WMenu * menu)
> >  
> >             menu->entries[i + MC_WORKSPACE1]->flags.indicator_on = 0;
> >     }
> > -   menu->entries[scr->current_workspace + 
> > MC_WORKSPACE1]->flags.indicator_on = 1;
> > -   wMenuRealize(menu);
> > +
> > +   if (scr->current_workspace) {
> > +           menu->entries[scr->current_workspace + 
> > MC_WORKSPACE1]->flags.indicator_on = 1;
> > +           wMenuRealize(menu);
> > +   }
> >  
> >     /* don't let user destroy current workspace */
> >     if (scr->current_workspace == scr->workspace_count - 1) {
> > -- 
> > 1.7.10.4
> > 
> > 
> > -- 
> > To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
> 
> 
> -- 
> To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to