add: if (menu->flags.isEditing) stopEditItem(menu, False);
context: itemSelectObserver(void *self, WMNotification *notif){    WEditMenu *menu = (WEditMenu*)self;    WEditMenu *rmenu;    rmenu = (WEditMenu*)WMGetNotificationObject(notif);    /* check whether rmenu is from the same hierarchy of menu? */        if (rmenu == menu) {	return;    }    if (menu->selectedItem && !menu->selectedItem->submenu) {	deselectItem(menu);    }}