Quoting "Carlos R. Mafra" <crma...@gmail.com>:
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.
Brrr, I need improve my english.
This is the current flow:
1. The workspace creates the clip when is restored
2. The clip is removed
3. The Clip is created again if the flag "noclip" is not set.
With the patch, the flow is:
1. The workspace is created, but not the clip, when is restored -> The
with_clip flag is used for that
2. The clip is not removed, because is not created in the step 1
3. The Clip is created if the flag "noclip" is not set. -> We use the
noclip flag for that
Then, only the step 3 creates the Clip.
If the flag noclip is set, without the patch, then, the Clip is never
created in the step 3 (I am not sure if is created in the step 1, I
need check the code).
If we use the flag noclip with the funcionality of with_clip flag, the
flow should be:
1. Set the noclip flag to false
2. The workspace is created, but not the clip, when is restored
(again, I need check if this function test the noclip flag)
3. The clip is not removed, because is not created in the step 1
4. *Restore* the initial value of "noclip", because the user might see
the clip
5. The Clip is created if the flag "noclip" is not set.
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.
And if the user want the clip? He select the "noclip" to false, then
the clip is created when the workspace is restored, then removed, then
created again...
Rodolfo García Peñas (kix)
http://www.kix.es/
--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.