mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Fix a crash in user menu and a menu map bug.
This commit is contained in:
@@ -235,6 +235,7 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
|
|||||||
wUserMenuRefreshInstances(napp->menu, wwin);
|
wUserMenuRefreshInstances(napp->menu, wwin);
|
||||||
#endif /* USER_MENU */
|
#endif /* USER_MENU */
|
||||||
|
|
||||||
|
if (wwin->flags.mapped)
|
||||||
wAppMenuMap(napp->menu, wwin);
|
wAppMenuMap(napp->menu, wwin);
|
||||||
#ifdef NEWAPPICON
|
#ifdef NEWAPPICON
|
||||||
wApplicationActivate(napp);
|
wApplicationActivate(napp);
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ wUserMenuGet(WScreen *scr, WWindow *wwin)
|
|||||||
char buffer[100];
|
char buffer[100];
|
||||||
char *path = NULL;
|
char *path = NULL;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
|
if ( wwin->wm_instance && wwin->wm_class ) {
|
||||||
tmp=wmalloc(strlen(wwin->wm_instance)+strlen(wwin->wm_class)+7);
|
tmp=wmalloc(strlen(wwin->wm_instance)+strlen(wwin->wm_class)+7);
|
||||||
sprintf(tmp,"%s.%s.menu",wwin->wm_instance,wwin->wm_class);
|
sprintf(tmp,"%s.%s.menu",wwin->wm_instance,wwin->wm_class);
|
||||||
path = wfindfile(DEF_USER_MENU_PATHS,tmp);
|
path = wfindfile(DEF_USER_MENU_PATHS,tmp);
|
||||||
@@ -344,6 +344,7 @@ wUserMenuGet(WScreen *scr, WWindow *wwin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
free(path);
|
free(path);
|
||||||
|
}
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user