1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 21:38:00 +01:00

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.
This commit is contained in:
Rodolfo García Peñas (kix)
2013-03-20 04:02:19 +01:00
committed by Carlos R. Mafra
parent 25d083a85f
commit 4222204abc

View File

@@ -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);