On 20/04/2013 15:33, Carlos R. Mafra wrote: > On Sat, 20 Apr 2013 at 14:05:00 +0200, Rodolfo García Peñas (kix) wrote: >> From: "Rodolfo García Peñas (kix)" <[email protected]> >> >> This patch avoid update (create) the Workspace Menu when wmaker >> is starting. When wmaker is starting, the scr->current_workspace >> is NULL, so we can check it in wWorkspaceMenuUpdate() and do nothing. >> >> --------------------------8<---------------------------------- >> @@ -751,7 +751,12 @@ void wWorkspaceMenuUpdate(WScreen * scr, WMenu * menu) >> WMenuEntry *entry; >> int tmp; >> >> - if (!menu) >> + /* >> + * If the scr->current_workspace doesn't exists yet >> + * is because we are starting wmaker, so we don't need >> + * the workspace menu yet >> + */ >> + if (!menu || !scr->current_workspace) >> return; >> --------------------------8<---------------------------------- >> >> So, now we don't need check in that function if the scr->current_workspace >> exists: >> >> --------------------------8<---------------------------------- >> - if (scr->current_workspace) { >> - menu->entries[scr->current_workspace + >> MC_WORKSPACE1]->flags.indicator_on = 1; >> - wMenuRealize(menu); >> - } >> + /* Update the workspace's menu */ >> + menu->entries[scr->current_workspace + >> MC_WORKSPACE1]->flags.indicator_on = 1; >> + wMenuRealize(menu); >> --------------------------8<---------------------------------- > > Wait! You just added this check in patch 1. This is a sign that your > patches are in wrong order.
Yes, I did that because is easier to understand. If I add only the if (!menu || !scr->current_workspace) is difficult know why I added it. -- ||// //\\// Rodolfo "kix" Garcia ||\\// //\\ http://www.kix.es/ -- To unsubscribe, send mail to [email protected].
