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

Variable workspace_menu moved to workspace object in global namespace

The variable workspace_menu, that contains the workspace_menu
is moved to the global workspace properties.

Now the screen is not needed to know the workspace_menu.

This variable is moved to the global workspace struct because it is
related to the workspace system, and not to the screen.
This commit is contained in:
Rodolfo García Peñas (kix)
2013-10-08 00:56:34 +02:00
committed by Carlos R. Mafra
parent f0c5073600
commit 9c252988f8
6 changed files with 22 additions and 20 deletions

View File

@@ -757,8 +757,8 @@ static void constructPLMenuFromPipe(WMenu * menu, WMenuEntry * entry)
}
static void cleanupWorkspaceMenu(WMenu *menu)
{
if (menu->frame->screen_ptr->workspace_menu == menu)
menu->frame->screen_ptr->workspace_menu = NULL;
if (w_global.workspace.menu == menu)
w_global.workspace.menu = NULL;
}
static WMenuEntry *addWorkspaceMenu(WScreen *scr, WMenu *menu, const char *title)
@@ -776,7 +776,7 @@ static WMenuEntry *addWorkspaceMenu(WScreen *scr, WMenu *menu, const char *title
wsmenu = wWorkspaceMenuMake(scr, True);
wsmenu->on_destroy = cleanupWorkspaceMenu;
scr->workspace_menu = wsmenu;
w_global.workspace.menu = wsmenu;
entry = wMenuAddCallback(menu, title, NULL, NULL);
wMenuEntrySetCascade(menu, entry, wsmenu);