From 4222204abc2118cafcc9c3e048f03235422c0e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Wed, 20 Mar 2013 04:02:19 +0100 Subject: [PATCH] Workspace clip creation in two steps This patch assigns always the clip to NULL and only if the clip is needed is created. This patch mainly is more clear/clean. --- src/workspace.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/workspace.c b/src/workspace.c index 3734b498..491452b3 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -88,16 +88,15 @@ int wWorkspaceNew(WScreen *scr) wspace = wmalloc(sizeof(WWorkspace)); wspace->name = NULL; + wspace->clip = NULL; if (!wspace->name) { wspace->name = wmalloc(strlen(_("Workspace %i")) + 8); sprintf(wspace->name, _("Workspace %i"), scr->workspace_count); } - if (!wPreferences.flags.noclip) { + if (!wPreferences.flags.noclip) wspace->clip = wDockCreate(scr, WM_CLIP); - } else - wspace->clip = NULL; list = wmalloc(sizeof(WWorkspace *) * scr->workspace_count);