On Tue, 16 Apr 2013 at 23:25:10 +0200, "Rodolfo García Peñas (kix)" wrote: > On 16/04/2013 22:06, Carlos R. Mafra wrote: > > >> +int wWorkspaceNew(WScreen *scr, Bool with_clip) > >> { > >> WWorkspace *wspace, **list; > >> int i; > >> @@ -102,7 +102,7 @@ int wWorkspaceNew(WScreen *scr) > >> sprintf(wspace->name, _("Workspace %i"), > >> scr->workspace_count); > >> } > >> > >> - if (!wPreferences.flags.noclip) > >> + if (!wPreferences.flags.noclip && with_clip) > > > > > > This seems redundant. > > > > Why can't you use the noclip flag directly instead of adding the new > > with_clip argument? Ie, if the noclip flag is set then that should be > > equivalent to your !with_clip case. > > > > Hi Carlos, > > these flags are different. > > wPreferences.flag.noclip is used when the user don't want to use the clip. > Then, if the flag is set, the Clip is never used.
So if the user doesn't want the clip you should not create it in the first place too. So instead of adding an extra parameter to control the creation, simply use the existing flag to make the decisions. I don't see the need to add the with_clip argument when you already have a noclip flag. > When we set the with_clip flag is only for that function flow, but not > for all the wmaker session. I don't see why these things have to be different. If noclip is set in WPrefs the user already told wmaker he doesn't want a clip, so the functions should not create it. -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.