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. When we set the with_clip flag is only for that function flow, but not for all the wmaker session. I use that flag because the workspace, when is created, can create the clip or not. Before these patches, the flow is something like: 1. Create a clip -> This clip is used to set the src->clip* values. 2. When every workspace is created, the flow is this: 878 clip_state = WMGetFromPLDictionary(wks_state, dClip); 879 if (scr->workspaces[i]->clip) 880 wDockDestroy(scr->workspaces[i]->clip); 881 882 scr->workspaces[i]->clip = wDockRestoreState(scr, clip_state, WM_CLIP); 883 if (i > 0) 884 wDockHideIcons(scr->workspaces[i]->clip); First remove the clip, then create it again. This flag select if the Clip should be created or not. Then, when the workspace is created, with this patch, the clip is not created, therefore, we don't need to destroy it later. Then, probably the lines 878-880 could be removed, but I didn't have enough time to check it. kix. -- ||// //\\// Rodolfo "kix" Garcia ||\\// //\\ http://www.kix.es/ -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.