mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 05:48:01 +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:
committed by
Carlos R. Mafra
parent
25d083a85f
commit
4222204abc
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user