On Sat, 20 Apr 2013, Rodolfo kix Garcia escribió:

> From: "Rodolfo García Peñas (kix)" <[email protected]>
> 
> The new function create_new_workspace() creates a workspace when
> the user request it, using the menu, or using the clip button to
> the next workspace and is in the last and the flag to create a new
> workspace is selected.
> 
> Then, the code in the functions newWSCommand() and checkWorkspaceChange()
> is replaced by this function.
> 
> The function wWorkspaceNew() is now static, because is only used in
> workspace.c. The call to crossWorkspace() can be removed, because is
> now done in wWorkspaceForceChange().
> 
> Probably, the code in crossWorkspace() can be moved to workspace.c
> and joined with the code in wWorkspaceForceChange(), but this is other
> story.
> ---
>  src/moveres.c   |    5 +----
>  src/workspace.c |   12 ++++++++----
>  src/workspace.h |    2 +-
>  3 files changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/src/moveres.c b/src/moveres.c
> index e3a63b9..7e35887 100644
> --- a/src/moveres.c
> +++ b/src/moveres.c
> @@ -878,10 +878,7 @@ static Bool checkWorkspaceChange(WWindow * wwin, 
> MoveData * data, Bool opaqueMov
>                       }
>                       /* create a new workspace */
>                       if (abs(data->rubCount) > 2) {
> -                             /* go to next workspace */
> -                             wWorkspaceNew(scr);
> -
> -                             crossWorkspace(scr, wwin, opaqueMove, 
> scr->current_workspace + 1, False);
> +                             create_new_workspace(scr);
>                               changed = True;
>                               data->rubCount = 0;
>                       }
> diff --git a/src/workspace.c b/src/workspace.c

About this patch, I did this change, but I am not sure about it now. I removed 
the "crossWorkspace" call, because the behaviour is the same. Perhaps I will 
split the patch in two too.

Don't apply it yet. More comments are welcome.

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


-- 
To unsubscribe, send mail to [email protected].

Reply via email to